Macro needed to copy/paste cell if cell below is blank, if not skip

rguerrieri

New Member
Joined
May 10, 2018
Messages
1
I would appreciate any help with writing a macro that took a 10,000 row spreadsheet and worked some copy/paste magic.

I have spreadsheet example with 2 tabs. one is original data download and the second is what it should look like after the macro is run.

I basically need the macro to do following:

Start R1C1
IF text is in that cell, AND R2C1 is blank, then COPY cell text in R1C1 AND Then Paste text to R2C1
IF R2C1 is not blank, move down 1 row
MOve back up # of cells and DELETE entire R1
Go to next cell below, IF blank, then paste text from R2C1
Keep going down rows until macro hits another cell with text containing "total"
Move active cell to next ROW
End copy/paste routine


THEN auto rerun same routine as you go down spreadsheet
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top