+ Reply to Thread
Results 1 to 4 of 4

Bringing in Data from one Worksheet to another based on matching multiple fields

  1. #1
    Registered User
    Join Date
    06-12-2013
    Location
    Buffalo, NY
    MS-Off Ver
    Excel 2010
    Posts
    2

    Bringing in Data from one Worksheet to another based on matching multiple fields

    In a bind -

    I have 2 spreadsheets basically the same information except one worksheet has an extra column. That extra column was completed manually 3 weeks ago. I need to pull that information into the other sheet that is to be pulled on Monday - HOWEVER - the 2 sheets will not be exactly the same. I am pulling from a database and some rows will drop, some have/will change values, so its not like the rows will match up anymore. I have done tests - trust me they will not. AND of course what I should have done is downloaded the email address which would have been the ID for that row, but it was not.

    So what I really need to do is find the values for 3 specific fields (A1-Date, A2-First and A3-Last Name) in one row in Sheet #1 and if they match the 3 fields in the new sheet (SHeet #2), enter the value from the manual field (Rider #) in Sheet #1 into a new field in Sheet #2. But if they are not in the same row it will not work. I tried an -IF(And.. formula but that only works per row. SO how do I find the 3 matching fields in other rows? IS it possible?

    We are only talking about 9000 records BUT it would take me all day probably to do the If(ANd and then finish the rest manually, because as you know once one row is out of sync they all are out of sync after that.

    Also I basically need to do the same thing again on Thursday - compare sheets, if this info matches then compare total fields. Then do a change report. Look forward to hearing from anyone on how to do this.

    I have seen VLookup mentioned but I don't think that will work across 3 fields, and if so I can not figure out how.
    And I really don't have time to figure out Access.

    At the office I am on a PC. Excel 2010 I think but will have to check tomorrow.

    Added a template file with 2 tabs so you can see what I mean. Thanks!!! - Karen
    Attached Files Attached Files
    Last edited by khcincotti; 06-12-2013 at 10:14 PM. Reason: adding attachment

  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: Bringing in Data from one Worksheet to another based on matching multiple fields

    1) In the OLD DATA sheet,

    Y1: Key
    Y2: =A2&"-"&B2&"-"&C2

    Copoy Y2 down the Y column as far as needed.

    2) In the NEW DATA sheet:

    D2: INDEX('old data-with rider number'!D:D, MATCH(A2&"-"&B2&"-"&C2, 'old data-with rider number'!$Y:$Y, 0))
    ...copied down.

    To resolve the #N/A errors, use:

    D2: =IFERROR(INDEX('old data-with rider number'!D:D, MATCH(A2&"-"&B2&"-"&C2, 'old data-with rider number'!$Y:$Y, 0)), "none")

    3) Copy column D, then do a Paste Special > Values to remove the formulas and leave the results behind, if needed.
    _________________
    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
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Bringing in Data from one Worksheet to another based on matching multiple fields

    Use this array formula in D2 then drag down.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-12-2013
    Location
    Buffalo, NY
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Bringing in Data from one Worksheet to another based on matching multiple fields

    Sweetness JBeaucaire - that worked perfectly. This helps alot. I will be attempting to do another thing with these 2 sheets so I may post another question but this really really helped me.

    kvsrinivasamurthy - i didn't try your code yet but I may if I have time. Thanks too.

    Thanks, Karen

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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