I am stuck on some (probably simple) VBA syntax. I am a PowerShell guy so VB is a bit foreign to me...
I find a cell of interest on another sheet and then I am copying the contents via an offset to a next free cell in a given column on the active sheet.
What I would actually like to know is two things.
1. How do I select all the cells which are populated from the same row as the .find function returns, into the range Variable named 'cell' ? There will be around five or six adjacent cells which are populated.
2. How do I specify a starting row as well as a column for the destination section of the copy function?
Things I tried for problem #1 range(cell).select.row.copy _ 'wouldn't that be nice. Doesn't work.
.Range.("cell").row.select.copy _ ' also not working.
I tried injecting additional copy lines into the DO loop to copy the adjacent cells as well. But some of the adjacent cells are empty and the row structure needs to be preserved as is. This means on destination the data gets out of sync. Hence the need to do it as an atomic operation.
For #2 I want to be able to express something like Destination = D5 and find the next free cell in column D. i.e. don't write into the top five cells even if they are empty. If I select all the populated cells from the source, I need to make sure it wil just auto fill from D5 into the next free row and out to the right, not overwrite to the left.
Here is the code which I am using... (typed manually from another system)
So everything is about this line
Thanks in advance for the gems.
Bookmarks