Reputation: 429
I'm working on Excel with VBA. I need to copy and paste some information from one row to and specific destination. I'm using this code:
''CUSTOM MESSAGE
Sheets("Extract").Range("AI" & sourceRow & "").Copy Destination :=
Sheets("Print").Range("H" & destRow + 7 & "")
The result of this code is:
But I need something like this:
As you can see, I need to change to the next row, before going out of the table. Any idea?
Upvotes: 0
Views: 90
Reputation: 827
Can you wrap the text in that cell? Something like this?
Sheets("Extract").Range("AI" & sourceRow).Copy Sheets("Print").Range("H" & destRow + 7).WrapText = True
Upvotes: 2
Reputation: 23285
The format of the Range()
is incorrect.
Try:
Sheets("Extract").Range("AI" & sourceRow).Copy Sheets("Print").Range("H" & destRow + 7)
Upvotes: 1