Capt_Antihero
New Member
- Joined
- Jun 16, 2014
- Messages
- 14
Hello,
I have a spreadsheet with data that sometimes every 20th row is misaligned. The sheet will be of varying row lengths depending on the data so I have nothing set. What I need is a macro in VBA that will find the first cell in A1 of Sheet1 with data and if there is data in that cell (lets say the first cell it finds is A20) then to select 9 cells including A20 (A20:J20) and copy and paste the data as an offset 2 cells to the right (it will end up being column C)
Once this is done I would need the macro to keep looping through column A until it finds every cell with data as above and completes the copy and paste offset so I need it to loop until there is no data in column A. Can any excel expert help me with this seemingly simple macro?
I have a spreadsheet with data that sometimes every 20th row is misaligned. The sheet will be of varying row lengths depending on the data so I have nothing set. What I need is a macro in VBA that will find the first cell in A1 of Sheet1 with data and if there is data in that cell (lets say the first cell it finds is A20) then to select 9 cells including A20 (A20:J20) and copy and paste the data as an offset 2 cells to the right (it will end up being column C)
Once this is done I would need the macro to keep looping through column A until it finds every cell with data as above and completes the copy and paste offset so I need it to loop until there is no data in column A. Can any excel expert help me with this seemingly simple macro?