View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Relative Reference help

Hi,

Try this, it pastes any value entered in A1 into the empty cell at the
bottom of the data list in column A.

Private Sub Worksheet_Change(ByVal Target As Range)
lastrowcola = Range("A65536").End(xlUp).Row
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub
If Target.Address = "$A$1" Then
Range("A1").Select
Selection.Copy
Cells(lastrowcola + 1, 1).Select
ActiveSheet.Paste
End If
End Sub

Mikw

"Barnej75" wrote:

I am trying to create a macro that will take values that change and
paste them one line below where the previous days numbers where
pasted. So if A1 is a ten I need it to paste in A2. Then the next
day A1 may be a 15 and I need it to paste in A3. I have tried many
things and it always copies the cell above instead of A1. Thanks in
advance.