How to enter a row when an "if condition" is met
Closed
El Magnifico
-
Aug 12, 2015 at 06:07 AM
vcoolio Posts 1411 Registration date Thursday July 24, 2014 Status Moderator Last seen September 6, 2024 - Aug 12, 2015 at 08:00 AM
vcoolio Posts 1411 Registration date Thursday July 24, 2014 Status Moderator Last seen September 6, 2024 - Aug 12, 2015 at 08:00 AM
Related:
- Excel insert row if condition met
- Insert gif in excel - Guide
- Saints row 2 cheats - Guide
- Insert check mark in word - Guide
- How to insert photo in word for resume - Guide
- Insert draft watermark in word on all pages - Guide
1 response
vcoolio
Posts
1411
Registration date
Thursday July 24, 2014
Status
Moderator
Last seen
September 6, 2024
262
Aug 12, 2015 at 08:00 AM
Aug 12, 2015 at 08:00 AM
Hello El Magnifico,
Something like this should get you started at least:-
You can have a look at my test work book at the following link:-
https://www.dropbox.com/s/ggro8uwtxtey6ym/El%20Magnifico.xlsm?dl=0
The code filters Column F for the criteria "Yes" and transfers the relevant row of data to sheet 2. Click on the "Transfer" button to see it work.
I hope that this helps.
Cheerio,
vcoolio.
Something like this should get you started at least:-
Sub CopyIt()
Application.ScreenUpdating = False
With ActiveSheet
.AutoFilterMode = False
With Range("F1", Range("F" & Rows.Count).End(xlUp))
.AutoFilter 1, "Yes"
On Error Resume Next
.Offset(1).EntireRow.Copy
Sheet2.Range("A" & Rows.Count).End(xlUp).Offset(1).PasteSpecial xlPasteValues
End With
.AutoFilterMode = False
End With
Sheet2.Columns.AutoFit
Application.CutCopyMode = False
Application.ScreenUpdating = True
Sheet2.Select
End Sub
You can have a look at my test work book at the following link:-
https://www.dropbox.com/s/ggro8uwtxtey6ym/El%20Magnifico.xlsm?dl=0
The code filters Column F for the criteria "Yes" and transfers the relevant row of data to sheet 2. Click on the "Transfer" button to see it work.
I hope that this helps.
Cheerio,
vcoolio.