Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy the value to the next open cell when the original cell changes

I have a Excel spreadsheet that is linked to another program and
displaying a value from the linked db in the first cell of the
spreadsheet. What I would like to do is capture the value of the first
cell as it changes and copy to the next available empty cell in the
row. Something like this example below.

Initial value shows:
Col1 Col2 Col3
53

when the value changes the first time do this:
Col1 Col2 Col3
54 53

when the value changes again do this:
Col1 Col2 Col3
55 53 54

And so on.....

Any help would be greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 396
Default Copy the value to the next open cell when the original cell change

Something in this spirit:


Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Target.Address = "$A$1" Then
Application.EnableEvents = False
Cells(1, Columns.Count).End(xlToLeft).Offset(, 1).Value = Target.Value
Application.EnableEvents = False
End If

End Sub



--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


" wrote:

I have a Excel spreadsheet that is linked to another program and
displaying a value from the linked db in the first cell of the
spreadsheet. What I would like to do is capture the value of the first
cell as it changes and copy to the next available empty cell in the
row. Something like this example below.

Initial value shows:
Col1 Col2 Col3
53

when the value changes the first time do this:
Col1 Col2 Col3
54 53

when the value changes again do this:
Col1 Col2 Col3
55 53 54

And so on.....

Any help would be greatly appreciated.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF value in a cell, return another cell's value to original cell DaleWid Excel Worksheet Functions 1 April 24th 09 04:46 PM
Copy rows but need to refer to same cell in original formula addison Excel Worksheet Functions 4 April 4th 08 04:29 PM
copy cell to next open line pswanie Excel Programming 1 June 29th 07 01:22 PM
I copy a formula and the results copy from the original cell brooklynsd Excel Discussion (Misc queries) 1 June 23rd 07 01:35 AM
How can I copy many formulas and keep original cell location? Linda Oz Excel Discussion (Misc queries) 3 October 5th 06 08:31 AM


All times are GMT +1. The time now is 05:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"