+ Reply to Thread
Results 1 to 6 of 6

Linking cell movement

  1. #1
    Registered User
    Join Date
    01-22-2009
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2007
    Posts
    22

    Linking cell movement

    I have two arrays of numbers (see attached file). I want to setup the worksheet so that I can link the movement of cells in the first array (B2:K:11) with the corresponding cells in second array (B13:K22). For example, if I was to swap cells C2 with F11 I would like cells C13 and F22 also to swap automatically. I would like this process to be automatic because in the future I will have several arrays all of which I would like to link the movement to one master array.

    Many thanks in advance for your help.
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Linking cell movement

    To do this without VBA, you simply need a standard lookup table the main chart can use to lookup values, regardless of where they are in the lookup table.

    With numbers in column M, the matching values in column N, this simple formula in B13 watches its partner cell B2 and matches appropriately:

    =INDEX($N:$N,MATCH(B2,$M:$M,0))

    Just copy that cell through the whole lower range.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    01-22-2009
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Linking cell movement

    Thanks for the reply JBeaucaire. Maybe I'm asking too much, but I was hoping for a drag and drop option. For example, I would drag cell B2 to some temporary position, then drag cell C2 to B2 and finally drag the previous contents of B2 to C2. Effectively I've switched cells B2 and C2 in the master array, and I was hoping that in this process I might also have switched the corresponding cells in the second array, that is cells B13 and C13.

    Many thanks again for your help.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Linking cell movement

    If the exercise is swapping cells, you could select two equal-sized non-overlapping ranges in the same table and press a swap button. The invoked procedure would swap all cells in corresponding positions in each table.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    01-22-2009
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Linking cell movement

    Hi Shg,

    Not sure what you mean by this. I'm using Excel 2007. Where is the swap button?

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Linking cell movement

    There is none -- you (or someone) would have to write code to implement it.

+ Reply to 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