The code below currently pastes data into all empty cells in range (LastRowPaste to PasteRange). How can I edit it to just paste into the first empty cell in range?
![]()
Please Login or Register to view this content.
The code below currently pastes data into all empty cells in range (LastRowPaste to PasteRange). How can I edit it to just paste into the first empty cell in range?
![]()
Please Login or Register to view this content.
Hi Nitefox,
You may be able to make use of the below code - I've hardcoded some ranges for the purpose of testing (I can't see the rest of your code to know where LastRowPaste and PasteRange are populated).
This code checks if there is an empty cell (there may not be an empty cell!) within the "A5:A12" range and if so it populates the first cell with the word test.![]()
Please Login or Register to view this content.
If you want to populate cells in adjacent columns just use offset to insert values, e.g.
Will populate the cell to right with "cell to the right".![]()
Please Login or Register to view this content.
Hope this helps.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks