A lot of the other examples I've seen of this have been too complex...
I am making a spreadsheet to track expenses across a number of areas... When a user enters an expense (enters the item name in a cell), I want excel to automatically insert a new row so that they can enter another item. So basically in pseudo:
If the row above has data, insert one new row
I tried the following code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = [OfficeItems].Row - 1 Then
[OfficeItems].EntireRow.Insert
End If
End Sub
But it seems to loop repeatedly then excel hangs.
I've attached the file, sans code, the named cell "OfficeItems" in this example is A4.
Please help, Thanks in Advance!
Bookmarks