+ Reply to Thread
Results 1 to 2 of 2

Matching up VIN numbers from two different worksheets - Vlookup?

  1. #1
    Forum Contributor
    Join Date
    03-21-2012
    Location
    New York NY
    MS-Off Ver
    2010
    Posts
    113

    Matching up VIN numbers from two different worksheets - Vlookup?

    I have two spreadsheets that are out of order. Both have the same VIN number list for the most part but you cannot simply sort by VIN. I need the cost news and class codes from Book 2 pasted into Book1 with the corresponding VIN number. SO if the first VIN on book1 is 1GCNCPEX1CZ3 21685 I could ctrl+F and find 1685 and see that the code is 1499 and cost new is 17,548. So I need a formula or something that says if E7 data shows up on book2 then pull data from F7 and H7 on book2 over to book1. spreadsheets attached.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Matching up VIN numbers from two different worksheets - Vlookup?

    Hi -

    Attached is a copy of Book1. I renamed it VIN Lookup. I used SUMPRODUCT to perform the lookup for 2 reasons:
    1. The VIN's are unique ID's, so there shouldn't be duplicates. That means SUMPRODUCT will find only one match and will multiply it by the target field, returning that value.
    2. SUMPRODUCT is one of the few functions that will work on a closed workbook. So, if you have Book2 closed, SUMPRODUCT will still execute the search. Other functions require Book2 to be open.

    The formula I used for the Class Codes looks like this:

    =SUMPRODUCT((E7='C:\Users\JCM239\AppData\Local\Temp\[Book2.xlsx]Sheet1'!$E$7:$E$136)*('C:\Users\JCM239\AppData\Local\Temp\[Book2.xlsx]Sheet1'!$F$7:$F$136))

    You will have to edit the formulas to the path location where you have Book2 stored. Basically it compares cell E7 (the first VIN) to the list of VIN's in Book2. If it finds a match, it multiplies that TRUE finding (which is 1) by the Class Code, which is what it returns.

    The formula is the same for the Cost New, just switching the range to multiply by to column H.

    One problem in your data set I noticed is in Book1, the first VIN is 1GCNCPEX1CZ3 21685. Notice the space between the first part of the VIN and the second part. In Book2, the VIN doesn't have that space, and therefore won't be a match. You need to make sure the VIN's in both lists are EXACTLY the same.

    Hope this helps.
    Attached Files Attached Files
    ____________________________________________
    If this has solved your problem, please edit the thread title to add the word [SOLVED] at the beginning. You can do this by
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

    If I have been particularly helpful, please "bump" my reputation by pressing the small star in the lower left corner of my post.

+ 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. Help with matching numbers on separate worksheets part 2
    By coatesy69 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-27-2016, 09:00 PM
  2. Help with matching numbers on separate worksheets
    By coatesy69 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-22-2016, 05:28 AM
  3. Replies: 4
    Last Post: 05-24-2012, 06:44 AM
  4. How to VLOOKUP w/matching data in 2 worksheets
    By hobbesey in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 09-24-2011, 01:00 AM
  5. Replies: 5
    Last Post: 07-26-2011, 10:35 PM
  6. [SOLVED] vlookup with not exactly matching numbers
    By Kelly in forum Excel General
    Replies: 6
    Last Post: 08-04-2006, 05:40 PM
  7. Vlookup Not matching identical numbers
    By bbrowers in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-10-2005, 09:17 PM

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