copy to next blank cell in colum

M

MyKeyJ

Ok kinda new hope i get this explained correctly.
What I have - Sheet 1 cell a1 will be receiving numbers from an outside
application. Each time a new number is pasted to this cell I need it to be
copied to the next availble cell in another colum. Basicly i want to create
a list of all the numbers that are pasted to cell A1. I have set a macro up
on the sheet to copy cell A1 and paste it to another sheet when ever the data
in cell a1 is changed. My problem is creating the list - specificly getting
the new number to be pasted to the next blank cell in the specified colum.
 
M

Mike Fogleman

Put this code in Worksheet 1 code module

Private Sub Worksheet_Change(ByVal Target As Range)
Dim LastRow As Long, ws As Worksheet

If Not Target.Address = "$A$1" Then Exit Sub

Set ws = Worksheets("Sheet2")
LastRow = ws.Cells(Rows.Count, "B").End(xlUp).Row
ws.Range("B" & LastRow + 1).Value = Target.Value

End Sub
Mike F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top