+ Reply to Thread
Results 1 to 11 of 11

Creating a sorted spreadsheet using data from 2 separate sheets

  1. #1
    Registered User
    Join Date
    09-23-2011
    Location
    U.S.A
    MS-Off Ver
    Excel 2003
    Posts
    6

    Creating a sorted spreadsheet using data from 2 separate sheets

    Hello,

    I have been trying to tackle an issue, but can't seem to get it right, so I've come to the experts.

    I have 2 spreadsheets. The first has 4 columns and the data is sorted correctly, and the second has 24 columns, but the data isn't sorted correctly.

    The data in columns C&D from sheet 1 matches the data in columns L&M on sheet 2. What I would like to do is based on those matching columns, create a sheet 3 that takes the data from sheet 2, compares it to the matching data on sheet 1 and sorts it correctly on sheet 3.

    Please help, as my eyeballs cannot take doing this process manually any longer.
    Last edited by AnonymousMe; 09-23-2011 at 01:24 PM. Reason: Rules and Guidelines

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Creating a sorted spreadsheet using data from 2 separate sheets

    i think we need to see the sheets
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    09-23-2011
    Location
    U.S.A
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Creating a sorted spreadsheet using data from 2 separate sheets

    It has been uploaded. NOTE. Sheet2 contains the way the data should be organized. Sorry for the mix up.
    Attached Files Attached Files

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Creating a sorted spreadsheet using data from 2 separate sheets

    seems to be missing the original sheet 2

  5. #5
    Registered User
    Join Date
    09-23-2011
    Location
    U.S.A
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Creating a sorted spreadsheet using data from 2 separate sheets

    The 4 columns on sheet 2 are the only four I am given. Sheet 1 also contains these 4 columns, as well as others.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Creating a sorted spreadsheet using data from 2 separate sheets

    Not sure if this is what you mean, but if you put this formula in A1 of Sheet3:

    =INDEX(Sheet1!A:A,MATCH(Sheet2!$C2,Sheet1!$L:$L,0))

    and copy down and across.. it copies the info in the same order as column C in Sheet2 is listed.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  7. #7
    Registered User
    Join Date
    09-23-2011
    Location
    U.S.A
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Creating a sorted spreadsheet using data from 2 separate sheets

    No luck. I received N/A in all rows where I paste the function.

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Creating a sorted spreadsheet using data from 2 separate sheets

    See attached.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    09-23-2011
    Location
    U.S.A
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Creating a sorted spreadsheet using data from 2 separate sheets

    Go figure, the sheets were named improperly on my end. Had the data vice versa. Thanks for your help. You are awesome.

  10. #10
    Registered User
    Join Date
    09-23-2011
    Location
    U.S.A
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Creating a sorted spreadsheet using data from 2 separate sheets

    I noticed in the formula you are matching by "display text" only. Is it possible to match by both display_text and display_number?

  11. #11
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Creating a sorted spreadsheet using data from 2 separate sheets

    The best way to do that and avoid array formulas, is to add helper columns to sheet1 and sheet2, that concatenates the 2 fields together, then index in sheet3 based on those new columns.

    So in Sheet1, Y2:

    =L2&"_"&M2

    copied down

    in Sheet2, E2:

    =C2&"_"&D2

    copied down

    Then in Sheet1, A1:

    =INDEX(Sheet1!A:A,MATCH(Sheet2!$E2,Sheet1!$Y:$Y,0))

    copied down and across.
    Attached Files Attached Files

+ 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