inserting rows

name456

Board Regular
Joined
May 23, 2007
Messages
90
I have a spreadsheet with a column that looks like this:

It has 15 items that repeat itself in that column. The other data in other columns match up with these 15 items. I want to extend COLUMN to 23 items. How do I do that and keep the information in the other keep matching up to the first 15 items

COLUMN A COLUMN B COLUMN C



40 0 1
41 0 1
42 0 1
43 0 1
44 0 1
45 0 1
46 0 1
47 0 1
48 0 1
49 0 1
50 0 1
51 0 1
52 0 1
53 0 1
54 0 1
40 2 2
41 2 2
42 2 2
43 2 2
44 2 2
45 2 2
46 2 2
47 2 2
48 2 2
49 2 2
50 2 2
51 2 2
52 2 2
53 2 2
54 2 2
40 3 3
41 3 3
42 3 3
43 3 3
44 3 3
45 3 3
46 3 3
47 3 3
48 3 3
49 3 3
50 3 3
51 3 3
52 3 3
53 3 3
54 3 3
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
59,294
Office Version
  1. 365
Platform
  1. Windows
Not exactly sure what you are after, but see if this is headed in the right direction:

<font face=Courier New><SPAN style="color:#00007F">Sub</SPAN> Insert_Rows()<br>    <SPAN style="color:#00007F">Dim</SPAN> lr <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN><br>    <SPAN style="color:#00007F">Dim</SPAN> r <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN><br>    <br>    <SPAN style="color:#00007F">Const</SPAN> RowsToInsert <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN> = 8<br>    <SPAN style="color:#00007F">Const</SPAN> CurrentBlockSize <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN> = 15<br>    <br>    Application.ScreenUpdating = <SPAN style="color:#00007F">False</SPAN><br>    lr = Range("A" & Rows.Count).End(xlUp).Row<br>    r = lr - CurrentBlockSize + 1<br>    <SPAN style="color:#00007F">Do</SPAN> <SPAN style="color:#00007F">While</SPAN> r > 1<br>        Rows(r).Resize(RowsToInsert).Insert<br>        r = r - CurrentBlockSize<br>    <SPAN style="color:#00007F">Loop</SPAN><br>    Application.ScreenUpdating = <SPAN style="color:#00007F">True</SPAN><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>
 
Upvote 0

Forum statistics

Threads
1,190,644
Messages
5,982,105
Members
439,755
Latest member
nicos18

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
Top