How to enter a row when an "if condition" is met
Closed
El Magnifico
-
Aug 12, 2015 at 06:07 AM
vcoolio Posts 1404 Registration date Thursday July 24, 2014 Status Moderator Last seen September 15, 2023 - Aug 12, 2015 at 08:00 AM
vcoolio Posts 1404 Registration date Thursday July 24, 2014 Status Moderator Last seen September 15, 2023 - Aug 12, 2015 at 08:00 AM
Related:
- Excel add row if condition met
- Pdf and xps add in 2007 - Download - Other
- Add accent over e - Guide
- Excel date format dd.mm.yyyy - Guide
- If cell contains text then return value multiple conditions ✓ - Excel Forum
- Excel conditional formatting if another cell contains specific text - Excel Forum
1 response
vcoolio
Posts
1404
Registration date
Thursday July 24, 2014
Status
Moderator
Last seen
September 15, 2023
259
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.