How do i change this macro, so it would go through the whole sheet1 instead of the first set of data. The data on sheet1 has data of 80 different accounts, every set of data includes the account number, balance, and activity. I would like my macro to go through sheet1 locate "account number:" in column A then copy the account number which is located in column C and copy the balance thats located in column H and past them in sheet 2 starting with row2.
Sub Demo()
Dim LstRw As Long, ThisRw As Long
LstRw = Cells(Rows.Count, "A").End(xlUp).Row
For ThisRw = 1 To LstRw
If Cells(ThisRw, "A").Value = "Bank Account Number" Then
Sheets("Sheet2").Cells(ThisRw, "A").Value = Cells(ThisRw, "C").Value
Sheets("Sheet2").Cells(ThisRw, "B").Value = Cells(ThisRw, "H").Value
End If
Next ThisRw
End Sub
Bookmarks