+ Reply to Thread
Results 1 to 9 of 9

Associate and moving cells together

  1. #1
    Registered User
    Join Date
    06-06-2019
    Location
    Colorado
    MS-Off Ver
    Windows 10
    Posts
    5

    Associate and moving cells together

    Hello all, I have a long list of part numbers that I am trying to match. I can sort them to match but there is data in a corresponding cell I need to move when I sort and match them. For example:

    5 1 a
    9 5 c
    7 9 d
    3 7 b
    1 3 e

    The second column and third column I need those values to remain together after the sort and look like this:

    5 5 c
    9 9 d
    7 7 b
    3 3 e
    1 1 a

    Is there any way that when I sort and match the first two columns to link that third column data with the second column and have it move when the MATCH function is completed?

  2. #2
    Forum Contributor jomaor1's Avatar
    Join Date
    10-08-2018
    Location
    Brasil
    MS-Off Ver
    Excel 2016
    Posts
    177

    Re: Associate and moving cells together

    Hello,

    That's...confusing

    But what i would do is this:

    Create 1 new Row, and do a vlookup. So if you add the column after the last one you have, you would write the formula on cell D2 like this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Assuming you have Headers.
    John.

    "I excel at jumping to conclusions"

  3. #3
    Registered User
    Join Date
    06-06-2019
    Location
    Colorado
    MS-Off Ver
    Windows 10
    Posts
    5

    Re: Associate and moving cells together

    After going back and reading that I am not explaining it well, since I am new I can't post a picture but I will try this again....

    Part #................. material #.........Location
    4.775-054.0..... 6.390-126.0..... P01-M40/1
    6.390-126.0..... 8.704-198.0..... P01-S10/WS
    8.624-387.0..... 8.705-974.0..... P01-S10/WS
    8.704-198.0..... 8.705-993.0..... P01-S40/1
    8.705-356.0..... 8.705-994.0..... P01-S40/1
    8.705-974.0..... 8.706-141.0..... P01-S40/2



    I need to match the material #'s in column B to the part #'s in column A and move the ones that are the same, in the same row. The "location" values in column C are tied with the material # they are beside. When the material # value moves I need the corresponding location # in column C to move with the value it is associated with in column B

    I need it to look like this:

    Part #............... material #.......... Location
    4.775-054.0
    6.390-126.0..... 6.390-126.0..... P01-M40/1
    8.624-387.0
    8.704-198.0..... 8.704-198.0..... P01-S10/WS
    8.705-356.0
    8.705-974.0..... 8.705-974.0..... P01-S10/WS

    I hope this explains it better
    Last edited by Rider_01; 06-06-2019 at 04:16 PM.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: Associate and moving cells together

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Registered User
    Join Date
    06-06-2019
    Location
    Colorado
    MS-Off Ver
    Windows 10
    Posts
    5

    Re: Associate and moving cells together

    I wanted to post a picture but that wasn't available so here is the sample file. In the "book1" that is the list I am starting with, the
    "book2" file is what I need it to look like when I am done. Basically I need to match the material # in column C to the part# in column A and
    move it to the cell beside the part# that it matches.

    When I move the material# I need that part number beside it in column D to follow the material# to the new location.
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Associate and moving cells together

    As shown in columns O:P, formulas that will match material# and location are:
    Material#: =IF(ISNUMBER(MATCH(M2,C$2:C$35,0)),M2,"")
    Location: =IF(O2="","",INDEX(D$2:D$35,MATCH(O2,C$2:C$35,0)))
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Associate and moving cells together

    You could use Power Query. Format your data in A1:D35 as a table, then use:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  8. #8
    Registered User
    Join Date
    06-06-2019
    Location
    Colorado
    MS-Off Ver
    Windows 10
    Posts
    5

    Re: Associate and moving cells together

    Quote Originally Posted by JeteMc View Post
    As shown in columns O:P, formulas that will match material# and location are:
    Material#: =IF(ISNUMBER(MATCH(M2,C$2:C$35,0)),M2,"")
    Location: =IF(O2="","",INDEX(D$2:D$35,MATCH(O2,C$2:C$35,0)))
    Let us know if you have any questions.

    AWESOME!!! Thank you, this worked perfectly. Just saved me from having to match and move 32,000 part numbers.

    Edit: Both of these solutions work, thanks guys you were a big help.

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Associate and moving cells together

    You're Welcome and thank you for the feedback. Please take a moment of the time that was saved to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 05-18-2012, 09:27 AM
  2. How to associate cell contents with other cells?
    By lankks in forum Excel General
    Replies: 28
    Last Post: 01-06-2012, 03:05 PM
  3. Associate Cells
    By djedjridoo in forum Excel General
    Replies: 1
    Last Post: 11-26-2011, 02:47 PM
  4. Associate data in different cells
    By rderkins in forum Excel General
    Replies: 1
    Last Post: 01-30-2010, 03:57 PM
  5. How do I associate word cells to equations?
    By Bakosova in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-29-2006, 12:15 PM
  6. Copy drop down boxes and associate to cells dynamically in excel
    By Debra Dalgleish in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-06-2005, 07:05 AM
  7. [SOLVED] Copy drop down boxes and associate to cells dynamically in excel
    By t Killion in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  8. Copy drop down boxes and associate to cells dynamically in excel
    By t Killion in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM

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