Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need code for the following:
If I enter a value in a2 , a row is inserted below Thanks for any assistance |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use this sheet event code:
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count = 1 Then Target.Offset(1).EntireRow.Insert xlShiftDown End If End Sub -- Rob van Gelder - http://www.vangelder.co.nz/excel "teresa" wrote in message ... I need code for the following: If I enter a value in a2 , a row is inserted below Thanks for any assistance |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You haven't tested A2 Rob.
Private Sub Worksheet_Change(ByVal Target As Range) With Target If .Address = "$A$2" Then .Offset(1).EntireRow.Insert xlShiftDown End If End With End Sub -- HTH RP (remove nothere from the email address if mailing direct) "Rob van Gelder" wrote in message ... Use this sheet event code: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count = 1 Then Target.Offset(1).EntireRow.Insert xlShiftDown End If End Sub -- Rob van Gelder - http://www.vangelder.co.nz/excel "teresa" wrote in message ... I need code for the following: If I enter a value in a2 , a row is inserted below Thanks for any assistance |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Bob - very helpful
"Bob Phillips" wrote: You haven't tested A2 Rob. Private Sub Worksheet_Change(ByVal Target As Range) With Target If .Address = "$A$2" Then .Offset(1).EntireRow.Insert xlShiftDown End If End With End Sub -- HTH RP (remove nothere from the email address if mailing direct) "Rob van Gelder" wrote in message ... Use this sheet event code: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count = 1 Then Target.Offset(1).EntireRow.Insert xlShiftDown End If End Sub -- Rob van Gelder - http://www.vangelder.co.nz/excel "teresa" wrote in message ... I need code for the following: If I enter a value in a2 , a row is inserted below Thanks for any assistance |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I assumed A2 was for example - you're right... Thanks.
-- Rob van Gelder - http://www.vangelder.co.nz/excel "Bob Phillips" wrote in message ... You haven't tested A2 Rob. Private Sub Worksheet_Change(ByVal Target As Range) With Target If .Address = "$A$2" Then .Offset(1).EntireRow.Insert xlShiftDown End If End With End Sub -- HTH RP (remove nothere from the email address if mailing direct) "Rob van Gelder" wrote in message ... Use this sheet event code: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count = 1 Then Target.Offset(1).EntireRow.Insert xlShiftDown End If End Sub -- Rob van Gelder - http://www.vangelder.co.nz/excel "teresa" wrote in message ... I need code for the following: If I enter a value in a2 , a row is inserted below Thanks for any assistance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Automatically inserting a symbol when text is entered in the cell | Excel Discussion (Misc queries) | |||
Value must be entered | Excel Discussion (Misc queries) | |||
Inserting current date when number entered in cell & Circular reference error? | Excel Discussion (Misc queries) | |||
No value entered | Excel Worksheet Functions | |||
How to get last entered value in a ROW? | Excel Programming |