View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.links
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Populating Rows Below

Here is the event code:

Private Sub Worksheet_Change(ByVal Target As Range)
Set r = Range("A1")
If Intersect(Target, r) Is Nothing Then Exit Sub
Application.EnableEvents = False
Rows("1:1").Select
Selection.Insert Shift:=xlDown
Rows("2:2").Select
Selection.Copy
Range("A1").Select
ActiveSheet.Paste
Application.EnableEvents = True
End Sub
--
Gary''s Student - gsnu2007d


"gusdafa" wrote:


Gary''s Student;2644827 Wrote:
This assumes that the name is in A1 and the date/time are in B1. Run
this
macro:

Sub push_down()
Set r1 = Range("A1:B1")
Set r2 = Range("A2:B2")
r1.Copy r2
r1.ClearContents
End Sub

The macro clears A1:B1, but leaves the pull-down in place for the next
entry.
--
Gary''s Student - gsnu2007d

Thanks for that, it worked.

Can you give some pointers with storing the previous copy on the rows
below it (A3:B3) instead of it being overwritten? That plus the macro
to autorun with each selection (at the moment I have to manually run
the macro after a selection), and finally, a better handle on
ClearContents as it not only clears out the cell content but also the
formulas? I'm sorry if it sounds like I'm asking for the moon. I'll be
doing some research on those queries but appreciate any help.

Thanks.




--
gusdafa