+ Reply to Thread
Results 1 to 8 of 8

Vlookup with more than one criteria

  1. #1
    Registered User
    Join Date
    01-28-2011
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    14

    Vlookup with more than one criteria

    Hi,

    I am trying to do a vlookup that also only returns the delivery time only if the day and customer ID are the same
    In the customer tab I have a list of customers and days, and from the schedule tab I want to look for the customer and only return the time if the days match
    See example below - it returns the times for customer EWM-1650 in the correct columns/days from the data held in the Transport Schedule Tab


    Customer Schedule Tab

    A B C D E F G H
    1 Customer ID Sun Mon Tue Wed Thu Fri Sat
    2 BB2003
    3 BB2006
    4 EWM-1650 14:15 13:30


    Transport Schedule Tab

    G N P
    1 EWM-1650 Mon 14:15
    2 EWM-1650 Wed 13:30
    3 EWM-166 Wed 08:00
    4 EWM-162 Fri 08:00
    5 EWM-163 Thu 14:30

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,994

    Re: Vlookup with more than one criteria

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,423

    Re: Vlookup with more than one criteria

    It would help if you attached a sample Excel workbook.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.

    Pete

  4. #4
    Registered User
    Join Date
    01-28-2011
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    14

    Re: Vlookup with more than one criteria

    Hi,

    Spreadsheet attached, thank you

    Andy
    Attached Files Attached Files

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,690

    Re: Vlookup with more than one criteria

    this appears to work in your sample...
    =IFERROR(LOOKUP(2,1/('Transport Schedule'!$G$5:$G$11=$A4)/('Transport Schedule'!$N$5:$N$11=H$3),'Transport Schedule'!$P$5:$P$11),"")
    in cell H4 of the customer schedule, dragged right and down.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  6. #6
    Registered User
    Join Date
    01-28-2011
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    14

    Re: Vlookup with more than one criteria

    Fantastic!! This works perfectly, thank you !! :-)

  7. #7
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,690

    Re: Vlookup with more than one criteria

    Great! glad it did the trick for you and thank you for the rep!

  8. #8
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Vlookup with more than one criteria

    Here is with SUMIFS function
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ 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. VLookup for 3 criteria
    By syed82 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-25-2014, 10:07 PM
  2. Large multi criteria / Vlookup/Choose Multi criteria
    By deanusa in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-20-2014, 01:48 AM
  3. vlookup with 2 criteria
    By khurramfarooqpk in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-08-2013, 07:48 AM
  4. vlookup with two criteria
    By amartino44 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-11-2013, 11:39 AM
  5. vlookup? match? index? MULTIPLE criteria for vlookup search problem....
    By aborg88 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-11-2013, 09:56 AM
  6. Need help on VLOOKUP with 2 or more Criteria
    By chico.corrales in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-29-2013, 10:26 PM
  7. VLOOKUP with a criteria
    By chloesnowling in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-10-2012, 09:00 AM

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