+ Reply to Thread
Results 1 to 7 of 7

Match and insert corresponding data across spreadsheets

  1. #1
    Registered User
    Join Date
    07-10-2009
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2013
    Posts
    5

    Match and insert corresponding data across spreadsheets

    Hello, I have a task that would take me hours to complete and I'm sure there's got to be a way to do it in Excel 2007. I need to get part numbers from one master cross reference spreadsheet to individual spreadsheets. The master cross reference spreadsheet has our company 7-digit number AND the manufacturer part number, while the individual spreadsheets only have the manufacturer part number. I need to have the individual spreadsheets match manufacturer part numbers and then insert our company's 7-digit number line-by-line.

    Master spreadsheet (snippet):

    7-digit PN MFG PN
    2206422 A04-04L
    2209624 A04-04S
    2203436 A04-054
    2208761 A04-06A
    2208897 A04-06C
    2208942 A04-06D
    2209292 A04-06E
    2209108 A04-06F
    2209627 A04-06S
    2208764 A04-08A
    2208900 A04-08C

    Individual spreadsheets (snippet):

    7-digit PN MFG PN

    ? A04-604
    ? A04-605
    ? A04-606
    ? A06-604
    ? A06-605
    ? A06-606
    ? A06-608
    ? A06-610
    ? A08-606
    ? A08-608
    ? A08-610

    Hopefully this makes some sense.

    Thanks!
    Last edited by patrickt; 07-10-2009 at 03:40 PM.

  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: Match and insert corresponding data across spreadsheets

    Forum examples sometimes lose something in the display. If you posted a sample workbook showing your need, before/after examples, I'm sure it will be clearest and result in the fastest solution.

    Click GO ADVANCED and use the paperclip icon to post up your workbook.
    _________________
    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
    07-10-2009
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2013
    Posts
    5

    Re: Match and insert corresponding data across spreadsheets

    Thanks for the tip. If you open the "Individual-spreadsheet.xlsx", you can see the first column is blank and in need of a 7-digit number from the "Master-cross-reference.xls". I have many of these "individual spreadsheets" and only one master. For example, the first row in column "7-digit" in the "Individual-spreadsheet.xlsx" should be 2203720 (if you search the master for "A04-604" it matches up to 7-digit number 2203720. Basically, I need a routine I can use to open each "individual spreadsheet" and reference the "Master-cross-reference.xls" to insert a 7-digit number in the first column of the individual spreadsheet depending on the "MFG PN" in the second column (for every row in the individual spreadsheet)...
    Attached Files Attached Files

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

    Re: Match and insert corresponding data across spreadsheets

    Don't really need a macro for something like this. In A3, enter this formula, copy down, then convert the results to values with COPY>EDIT>PASTESPECIAL - Values on that column.

    =INDEX('[Master-cross-reference.xls]Sheet1'!$A:$A, MATCH(B4,'[Master-cross-reference.xls]Sheet1'!$B:$B, 0))

  5. #5
    Registered User
    Join Date
    07-10-2009
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2013
    Posts
    5

    Re: Match and insert corresponding data across spreadsheets

    Thank you. You are awesome! Very much appreciated!

  6. #6
    Registered User
    Join Date
    07-10-2009
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2013
    Posts
    5

    Re: Match and insert corresponding data across spreadsheets

    At first it wasn't quite matching correctly. I changed the formula you gave to MATCH(B3 instead of MATCH(B4...

    =INDEX('[Master-cross-reference.xls]Sheet1'!$A:$A, MATCH(B3,'[Master-cross-reference.xls]Sheet1'!$B:$B, 0))

    Thanks. Works perfectly...

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

    Re: Match and insert corresponding data across spreadsheets

    Of course, my bad. Nice catch!

+ 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