Hi, I am relatively new at coding in Excel and don't have much of an idea of where to start with what I need done.
Basically, I want to have rows where I enter data that have costs associated with them. As such I want to have a total row at the bottom of the spreadsheet that sums the costs from the above rows. However some people may have more data than others but I still want to have the total row just below the last line of people entering data.
I have figured out that to do this I need to use a Worksheet_change event. I have also gotten it to add a line below cell A15 when something is typed in A15 using this code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$15" Then
Call mymacro
End If
End Sub
However once this is done and I begin to type in the newly created line it will not add another line below this like it did for A15.
Is there some possible way to set this up so that as I move down the sheet adding lines it will continually insert more rows as each additional row is typed in?
I was thinking that maybe it would have to be linked to the total cell/row. somehting like 'if(cell above total line=blank,do nothing,else - insert row)'...I just have no idea how to code this into an event.
Any help would be appreciated
Bookmarks