View Single Post
  #4   Report Post  
zero635
 
Posts: n/a
Default


comotoman Wrote:
Sub InsertRow()
Rows("23:23").Select
Selection.Insert Shift:=xlDown
Rows("11:11").Select
Selection.Insert Shift:=xlDown
End Sub

i need the row number determined by a cell on the active sheet.

j8: '15'
Sub InsertRow()
Rows("15:15").Select
Selection.Insert Shift:=xlDown
End Sub


I tried this code and based on the cell value in J8 it will jump down
to that line and insert a row.

Sub Insert()
Rows(Range("j8")).Select
Selection.Insert Shift:=xlDown
End Sub

If you use this code it will place one under to insert under the value
of J8 or you could do negative to do it above.

Sub Insert()
Rows(Range("j8") + 1).Select
Selection.Insert Shift:=xlDown
End Sub

Maybe alittle closer to what you need?

zero


--
zero635
------------------------------------------------------------------------
zero635's Profile: http://www.excelforum.com/member.php...o&userid=24802
View this thread: http://www.excelforum.com/showthread...hreadid=475101