Announcement

Collapse
No announcement yet.

Linking Multiple Cells to Single Cell

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Linking Multiple Cells to Single Cell

    I have a list in column A, with individual text information in each cell.
    I would like to set it up such that when I select a cell (eg. A1) from the column list, it's contents is referenced to another cell. (eg B1)

    And when i click on another cell from the column list (eg. A2), the contents of this cell replaces the first selection with it's contents, in the same cell (B1.)

    I'm aware of the simple "=" insert, but it relates to two cells only...


    Can this be accomplished?


    Thanks for any help

    ~Jeff
    Last edited by Jeff P; July 18th, 2006, 12:29.

  • #2
    Re: Linking Multiple Cells to Single Cell

    Are you saying that any cell you select in Column "A" is copied to cell B1?

    Comment


    • #3
      Re: Linking Multiple Cells to Single Cell

      Thanks for the speedy reply, Dave!

      As for your question.. Yes, In fact every cell containing text from column A would be copied (or temporarily displayed) to B1.


      I'm thinking more along the lines of a switch,.. (multiple inputs to one output.) eg. ten computers connected to one monitor, yet only one can be visible. ..

      So with each cell selected within column A, only that particular cells contents would be displayed in B1.. until a new cell from column A was selected. (in which it's contents only, would then be displayed in B1, etc..)




      thanks again!

      Jeff
      Last edited by Jeff P; July 18th, 2006, 13:18.

      Comment


      • #4
        Re: Linking Multiple Cells to Single Cell

        Right click on the sheet name tab, choose View Code and in here paste the code below
        Code:
        Private Sub Worksheet_SelectionChange(ByVal Target As Range)
            If Target.Column = 1 Then Range("B1") = Target
        End Sub

        Comment


        • #5
          Re: Linking Multiple Cells to Single Cell

          Wow, thanks for the detailed solution... it worked like a charm!

          yet.... I wish I knew why...

          I'm trying to understand what exactly is going on... Not sure how it knows to use column A as the source

          My initial inquiry was a mere example, to keep it simple... I was hoping to simply exchange your code with the relevant to my specific situation...
          but now, i'm completely lost.

          ....In actuality my true inquiry was to be used as such: from worksheet1 Column E to be referenced in worksheet2 B1


          any chance of getting an update? (...sorry about that)


          if not ... no worries, I've seen that it can work, and will do some research and figure out what's going on.


          Thanks again for the help!

          Jeff
          Last edited by Jeff P; July 18th, 2006, 15:06.

          Comment


          • #6
            Re: Linking Multiple Cells to Single Cell

            Add the code below to Worksheet 1
            Code:
            Private Sub Worksheet_SelectionChange(ByVal Target As Range)
                If Target.Column = 5 Then Worksheets(2).Range("B1") = Target
            End Sub

            Comment


            • #7
              Re: Linking Multiple Cells to a Single Cell

              Now I understand what's going on.... tremendously helpful.


              ... thanks for all the help, Dave!


              ~Jeff

              Comment

              Working...
              X