• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to have excel add in rows between two numbers

GeoDG

New Member
Hello,


If anyone out there could help me with the following I would be most appeciative.


In column A I have the number 12.00 in row 2 and the number 134.00 in row 3. Is it possible to have excel insert the required number of rows between row 2 and row 3 such that column A in row 4 = 12.01, column A row 5 = 12.02.... column A row xx = 133.99.


maybe this will explain what i would like better...


Initally

Column A

Row 1

Row 2 12.00

Row 3 134.00


and what i would like excel to do for me...

Column A

Row 1

Row 2 12.00

Row 3 12.01

Row 4 12.02

Row 5 12.03

Row 6 12.04

.

.

.

Row xx 133.98

Row xx 133.99

Row xx 134.00


So i want excel to but the required number of rows between two numbers based on the interval in which i want to increase between the 2 original numbers.


Thanks for any help


Kind regards


GeoDG
 
GeoDG

have a go at this macro

add it to a code module and execute once

[pre]
Code:
Sub Addrows()
First = [A2]
Last = [A3]
For i = Last - 0.01 To First + 0.01 Step -0.01
Rows("3:3").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
[A3].Value = i
Next
End Sub
[/pre]
 
Back
Top