comotoman Wrote:
I have a macro that inserts a line, how can i modify it to insert a line
by a number in a cell corresponding to the row number?
ex:
J8: "22"
Inserts a new row between rows 22 and 23
J8:"10"
Inserts a new row between rows 10 and 11
Comotoman,
Not sure if this is what you are looking for but hope it helps. Let me
know.
Sub InsertRow()
Rows("23:23").Select
Selection.Insert Shift:=xlDown
Rows("11:11").Select
Selection.Insert Shift:=xlDown
End Sub
This will insert rows between 22 and 23 and 10 and 11.
Good Luck,
zero
--
zero635
------------------------------------------------------------------------
zero635's Profile:
http://www.excelforum.com/member.php...o&userid=24802
View this thread:
http://www.excelforum.com/showthread...hreadid=475101