Closed Thread
Results 1 to 3 of 3

On click, copy text into another cell - XL2K

  1. #1
    Bob the Builder
    Guest

    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. #2
    Fred
    Guest

    Re: On click, copy text into another cell - XL2K

    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. #3
    Fred
    Guest

    Re: On click, copy text into another cell - XL2K

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


Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1