+ Reply to Thread
Results 1 to 3 of 3

vlookup multiple tables

  1. #1
    Registered User
    Join Date
    08-03-2011
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2003
    Posts
    1

    vlookup multiple tables

    Help please!

    I am trying match data from two columns, from seperate worksheet and where there is a match, populate the columns with data from one of the worksheet to columns on the other.

    With the attached example, on one sheet I have address information (fictitious) and other sheet I have sales information. Where the address number and street address match from the two worksheet, I want to add sale price and sale date in the appropriate column in the address information worksheet.

    I have been trying to do this with multiple, nested vlookups, but without any success. Any help would be very much appreciated!

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: vlookup multiple tables

    Hello,

    the data in the two sheets is not formatted consistently. The Address Number is text on one sheet and numbers on the other. the Address Street has trailing spaces in some rows. This needs to be taken into consideration when constructing a formula.

    In N2
    Please Login or Register  to view this content.
    Copy down. note that the first match is for row 7. Before that, no match is found and the formula returns N/A. This can be fixed but will make the formula even longer.

    You could use conditional formatting to format N/A values with white text on white background instead.

    In O2 and copied down:
    Please Login or Register  to view this content.
    The formulas work on the assumption that each Address exists only once. If there are several records for the same address, you'd need a different approach.

    cheers,

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: vlookup multiple tables

    =IF(ISNA(INDEX('Sales information'!D$2:D$7,MATCH($D2&$E2,'Sales information'!$A$2:$A$7&'Sales information'!$B$2:$B$7,0))),"",INDEX('Sales information'!D$2:D$7,MATCH($D2&$E2,'Sales information'!$A$2:$A$7&'Sales information'!$B$2:$B$7,0)))

    Array Entered with Control-Shift and Enter rather than just Enter

    Note that you have trailing spaces after your street address on the Sales Information sheet. You need to correct that for this to work.

    See the example workbook.


    Regards
    Attached Files Attached Files
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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