Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy to next blank cell in colum
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy to next blank cell in colum
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 "MyKeyJ" wrote in message ... 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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy to next blank cell in colum
Thank You.
The provided code works perfect. Thanks for your help. MJ "Mike Fogleman" wrote: 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 "MyKeyJ" wrote in message ... 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Fill colum to the next non blank row | Excel Discussion (Misc queries) | |||
Need macro to check if cell is not blank & previous cell is blank, copy information from row above & paste | Excel Programming | |||
Copy to first Blank cell in Colum C Non blank cells still exist be | Excel Programming | |||
find range of non-blank cells in colum | Excel Programming | |||
COPY A CONCATENATE CELL TO BLANK CELL PUTTING IN THE NEXT BLANK C. | Excel Discussion (Misc queries) |