VBA help with filling empty rows with data

dilla1988

New Member
Joined
Sep 4, 2014
Messages
22
Hello,
I'm new and I'm not an expert on VBA and macros.

I have a file that has about 55000 rows and I need to sort the data out and get them out on a csv file that has its own format.

Now my data look like this.


fgs dfsdf sdfs
GSD DSF dfgf



2 5 7 7 9 0 0 6
2 5 7 7 9 0 0 52
2 5 7 7 9 0 0 52

2 5 7 7 9 0 0 52
2 5 7 7 9 0 0 51
2 5 7 7 9 0 0 52
2 5 7 7 9 0 0 54

2 5 7 7 9 0 0 54
2 5 7 1 9 0 0 54
end


Now imagine the numbers are in consecutive cells. See the empty row between numbers. I want a code where it searches through the second half of the data, and check for empty row, pick the entry from top , insert in that empty space and loop till end.

so it would look like:

fgs dfsdf sdfs
GSD DSF dfgf



2 5 7 7 9 0 0 6
2 5 7 7 9 0 0 52
2 5 7 7 9 0 0 52
fgs dfsdf sdfs
2 5 7 7 9 0 0 52
2 5 7 7 9 0 0 51
2 5 7 7 9 0 0 52
2 5 7 7 9 0 0 54
GSD DSF dfgf
2 5 7 7 9 0 0 54
2 5 7 1 9 0 0 54
end

Please help me out guys :)

thanks a lot
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
hey tyger,

sorry for the late response.

I want to keep one empty row if the code finds more than 1 empty row. so for example, if 3 empty rows found it would delete any of the 2 empty so we're left with one row. if found 2 empty rows just one would be deleted.

thanks
 
Upvote 0

Forum statistics

Threads
1,215,757
Messages
6,126,694
Members
449,331
Latest member
smckenzie2016

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