Repeat adding rows

basicjohn

New Member
Joined
Aug 9, 2005
Messages
14
Hi All,

I have an excel sheet as follows :
a b
1Supp1 Code1
2Supp2 Code2

This is repeated for 1000 rows. Now question is how do I add 3 empty rows for each supplier line until the end of the supplier line by using Macro ?

Meaning results should be as follows :
a b
1Supp1 Code1
2
3
4
5Supp2 Code2
6
7
8
9Supp3 Code3

Hope to hear from you all soon.

Cheers for now.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Or how about:

Code:
For iRow = Range("A" & Rows.Count).End(xlUp).Row To 2 Step -1
        Rows(iRow).Resize(3).Insert
    Next

Hope that helps!

EDIT: Typo
 
Upvote 0
Thank you very much

Noted the tools and it work very well, and also for the macro that was given by Taz was also wonderful....

Keep up the good work guys .... :)
 
Upvote 0

Forum statistics

Threads
1,214,584
Messages
6,120,384
Members
448,956
Latest member
JPav

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