Insert Missing Numbers

R

ryguy7272

I used to have a macro that inserted rows, between numbers, and inserted the
missing numbers as it looped down the list. Can't find it now...

Basically, if I have the following setup:
A1 = 1
A2 = 8
A3 = 10

I want to see:
A1 = 1
A2 = 2
A3 = 3
....
A9 = 9
A10 = 10

How can I do this?

Thanks,
Ryan--
 
J

Jacob Skaria

Ryan/Simon

You can avoid that looping using this one liner....With data starting from
cell A1

Range("A1").DataSeries Rowcol:=xlColumns, Type:=xlLinear, _
Step:=1, Stop:=WorksheetFunction.Max(Columns(1))

If this post helps click Yes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top