Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Bob the Builder
 
Posts: n/a
Default On click, copy text into another cell - XL2K

I'm trying figure out how to copy text from a "list" (i.e., 4 or 5 text
entries in one column, but each in individual cells) to another cell in the
same spreadsheet by clicking on the original cell just once. The text always
needs to copy to the same final cell, but can change. For example, cells
A1:A3 contain "A1:small, A2:medium and A3:large". Clicking on one of these
pastes it into another cell, such as D1. Each time a different cell is
clicked in A1:A3, the text in D1 changes accordingly.

Any help is greatly appreciated.
  #2   Report Post  
Fred
 
Posts: n/a
Default

Try pasting this procedure in the appropriate worksheet object code
sheet

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Row = 1 And Target.Column = 1 Then
Range("d1") = Range("a1")
ElseIf Target.Row = 4 And Target.Column = 1 Then
Range("d1") = Range("a2")
ElseIf Target.Row = 7 And Target.Column = 1 Then
Range("d1") = Range("a3")
End If
End Sub

Good luck!

  #3   Report Post  
Fred
 
Posts: n/a
Default

Sorry, correct the target.row = 4 to 2, amd target.row = 7 to 3. Mea
culpa, bigtime!

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
Text wider than one cell is not displayed in the next empty cell Len Pace Excel Discussion (Misc queries) 5 February 18th 05 01:24 AM
How to copy a formula as text to another cell? Audrey Excel Discussion (Misc queries) 2 February 16th 05 08:35 PM
sending data from one cell to another (not using copy & paste) Charlie Payne Excel Worksheet Functions 3 December 6th 04 04:28 PM
copy a cell value not its function KC Mao Excel Discussion (Misc queries) 2 December 4th 04 05:30 AM
copy paste cell character limit Fred Excel Discussion (Misc queries) 1 December 2nd 04 09:58 PM


All times are GMT +1. The time now is 07:41 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"