Hello sitelbanat,
You didn't specify if you want these values to be placed in sheet2 on the same
row(s) they come from on sheet1 (which could be done using formulas instead of vba)
or if you want them just listed on sheet2 from row 2 on down.
Below is a way to do either.
First one will place them in the same row(s) they are found in on sheet1.
Code:
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
Second one will just list them out in sheet2 starting in row 2.
Code:
Sub Demo2()
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(Rows.Count, "A").End(xlUp)(2).Value = Cells(ThisRw, "C").Value
Sheets("Sheet2").Cells(Rows.Count, "B").End(xlUp)(2).Value = Cells(ThisRw, "H").Value
End If
Next ThisRw
End Sub
These are both intended to be run from sheet1.
[EDIT:]
Hey Smitty, how's things?
Been away for a while. (On vacation.)
Happy to report the moose is in the freezer!
Looks like we get to eat again this winter.
