Hi all,
Long-time lurker now registered. Looking for a bit of help.
I did a search on here for taking a row, for example from "Sheet1" and moving it to "Sheet2". The code works in principle however on occasion it takes two rows across. The key word is "YES" in column 'i' and the macro is enabled with a button.
Could anyone advise why it sometimes takes two rows, even though I'm only putting "yes" in one row?
Thanks in advance
Long-time lurker now registered. Looking for a bit of help.
I did a search on here for taking a row, for example from "Sheet1" and moving it to "Sheet2". The code works in principle however on occasion it takes two rows across. The key word is "YES" in column 'i' and the macro is enabled with a button.
Could anyone advise why it sometimes takes two rows, even though I'm only putting "yes" in one row?
Thanks in advance
Code:
Sub Button1_Click()
Application.ScreenUpdating = False
Columns(9).AutoFilter 1, "Yes"
With Range("a2", Range("i" & Rows.Count).End(3))
.Copy Sheet2.Cells(Rows.Count, 1).End(3).Offset(1)
.EntireRow.Delete
End With
Columns(9).AutoFilter
Application.ScreenUpdating = True
Selection.AutoFilter
End Sub