PC Review


Reply
Thread Tools Rate Thread

copy to next blank cell in colum

 
 
MyKeyJ
Guest
Posts: n/a
 
      27th Dec 2007
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 With Quote
 
 
 
 
Mike Fogleman
Guest
Posts: n/a
 
      27th Dec 2007
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" <(E-Mail Removed)> wrote in message
news:577BC6B7-D40C-4FC4-816E-(E-Mail Removed)...
> 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 With Quote
 
MyKeyJ
Guest
Posts: n/a
 
      27th Dec 2007
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" <(E-Mail Removed)> wrote in message
> news:577BC6B7-D40C-4FC4-816E-(E-Mail Removed)...
> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need macro to check if cell is not blank & previous cell is blank, copy information from row above & paste JenIT Microsoft Excel Programming 4 12th Apr 2007 08:56 PM
Copy to first Blank cell in Colum C Non blank cells still exist be =?Utf-8?B?VWxyaWsgbG92ZXMgaG9yc2Vz?= Microsoft Excel Programming 2 8th Oct 2006 07:35 PM
Copy data in one cell to blank cell immediately below, repeat =?Utf-8?B?SmVmZg==?= Microsoft Excel Worksheet Functions 1 19th May 2006 07:12 PM
Copy form on cell or Colum to another colum =?Utf-8?B?TXIgSm9obnNvbg==?= Microsoft Access Forms 3 5th May 2006 08:45 PM
COPY A CONCATENATE CELL TO BLANK CELL PUTTING IN THE NEXT BLANK C. =?Utf-8?B?UVVFU1Q0MTA2Nw==?= Microsoft Excel Misc 1 15th Jan 2005 09:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:27 AM.