This is my first post so please bear with me
I just despair ... maybe someone can help with the following VBA code?
I have two "almost" identical tables. In one of them, comments are stored in column Q. I want to transfer the comments from the "old" table to the "new" table after comparing columns B and G.
Unfortunately the code runs only up to line 60 ... then it stops. The code should of course run to the end of the table, even if in between a new content has been added to a row.
Sub Copy()
Dim rng As Range
For Each rng In Sheets("04_2023").Range(Cells(2, 2), Cells(Rows.Count, 1).End(xlUp))
If Sheets("Kreuztabelle").Cells(rng.Row, 2) = Sheets("04_2023").Cells(rng.Row, 2) And _
Sheets("Kreuztabelle").Cells(rng.Row, 7) = Sheets("04_2023").Cells(rng.Row, 7) Then
Sheets("Kreuztabelle").Cells(rng.Row, 17).Copy _
Destination:=Sheets("04_2023").Cells(rng.Row, 17)
Sheets("Kreuztabelle").Cells(rng.Row, 18).Copy _
Destination:=Sheets("04_2023").Cells(rng.Row, 18)
End If
Next rng
End Sub
Thank you in advance for your help and support