View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Southern at Heart Southern at Heart is offline
external usenet poster
 
Posts: 25
Default automatically inserting rows

SIMPLY LOVELY!
One more thing. My 'footer'/last row actually consists of 3 rows. Can I
change that code to accommodate 3 rows?
thanks so much.


"Don Guillett" wrote:

Footer is not the proper word for the last row
However, IF? you are saying that you want to enter info in the row just
before the last row and have a row inserted between that data and the last
row then right click the sheet tabview codecopy/paste this. Now,when you
add data in the next to the last row of column A, the row will auto insert
below.

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Column = 1 And Target.Row = _
Cells(Rows.Count, 1).End(xlUp).Row - 1 Then
Rows(Target.Row + 1).insert
End If
Application.EnableEvents = True
End Sub

Sub fixifbroke()
Application.EnableEvents = True
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Southern at Heart" wrote in
message ...
I have an expense report I made. The Heading across the top of the columns
a
Date Description Mileage Hours Supplies Total

then at the bottom it tallys up these, and has a few other things like
hourly wages...

Sometimes a job might have 30 lines, and other time 100 lines. Is there a
way to have the footer part of my sheadsheet automatically adjust (add
lines
as I use them) so that I don't have to have my footer way down, off the
screen, when I'm doing a smaller job. But if it does automatically add
lines
in, then those lines will need to be tallied in the totals in the footer
section.
I would be great if there were a feature that would do this: It would
just
give be 1 blank row before the footer. And then when I put data in that
row
for that day, it would add another blank row, so it would automatlcally
grow
in this fashion.
thanks,
southern at heart