I have this code that moves information from column A in sheet1 to column B on every 3rd row in sheet2. How can I modify this code to do exactly the same thing but only if column H in the row is "Y"?


Sub move()
    Dim i As Long, n As Long
    n = 2
    With Sheets("sheet1")
        For i = 1 To .Range("a" & Rows.Count).End(xlUp).Row
            If .Cells(i, 1).Value <> "" Then
                n = n + 3
                Sheets("sheet2").Cells(n, "b").Value = .Cells(i, 1).Value
            End If
        Next
    End With
End Sub