+ Reply to Thread
Results 1 to 9 of 9

Help on XLOOKUP formula with multiple criteria

  1. #1
    Registered User
    Join Date
    02-16-2012
    Location
    Philippines
    MS-Off Ver
    Excel 365
    Posts
    6

    Help on XLOOKUP formula with multiple criteria

    I need help to formulate a formula with multiple criteria.

    On the ORDER tab, I want to get the UNIT PRICE column based from the QTY column, UNIT column and CATEGORY column.
    It will need to lookup on the PRODUCT tab which shows the different amount per PRICE CATEGORY. Each product have a different quantity per package.

    BOX = has different quantity
    PAIL and BAG = 1 quantity only

    Btw, I define the following names:

    TBL_PRODUCT =PRODUCT!$B$3:$F$7
    PRICE_CATEGORY =PRODUCT!$D$3:$F$3
    QTY_PER_PACKAGE =PRODUCT!$C$3:$C$7
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Help on XLOOKUP formula with multiple criteria

    Hi
    What;s the difference between box/pail/piece?

  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: Help on XLOOKUP formula with multiple criteria

    This works for everything except Strawberry on line 9. Not sure of your logic.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Might point you in the right direction.
    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


  4. #4
    Registered User
    Join Date
    02-16-2012
    Location
    Philippines
    MS-Off Ver
    Excel 365
    Posts
    6

    Re: Help on XLOOKUP formula with multiple criteria

    If you check the PRODUCT tab, you'll see a quantity package

    Each product indicates the quantity of each package which is in pieces.

    PAIL and BAG is equivalent to 1 Piece
    BOX, depends on the quantity of each package

    e.g. Apple contains 5pieces per BOX
    Mango contains 3pieces per BOX
    Strawberry contains 10 pieces per BOX
    Orange juice is equivalent to 1 PAIL
    Rice is equivalent to 1 BAG

  5. #5
    Registered User
    Join Date
    02-16-2012
    Location
    Philippines
    MS-Off Ver
    Excel 365
    Posts
    6

    Re: Help on XLOOKUP formula with multiple criteria

    Thanks for replying.

    Ah yeah.. I put the wrong amount on the unit price of the Strawberry. This answers my question however is it possible to make it Dynamic?

    Like what if I added a new product on the table without modifying the formula.

  6. #6
    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: Help on XLOOKUP formula with multiple criteria

    … is it possible to make it Dynamic?
    I'll come back with that tomorrow.

  7. #7
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Help on XLOOKUP formula with multiple criteria

    Hi,
    For DYNAMIC formula -
    please see attached in column H:
    =INDEX(PRODUCT!$D$4:$F$8,MATCH(B5:B10,PRODUCT!B4:B8,0),MATCH(E5:E10,PRICE_CATEGORY,0))*IF(D5:D10="PIECE",1,VLOOKUP(B5:B10,PRODUCT!B4:C8,2,0))
    Attached Files Attached Files

  8. #8
    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: Help on XLOOKUP formula with multiple criteria

    Please see the reworked sample file. I have created Dynamic Named Ranges and also added Structured Tables.

    The workbook demonstrates different methods comparing the original static formula with formulae using Dynamic Named Ranges and also Structured Table References.
    Attached Files Attached Files

  9. #9
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,428

    Re: Help on XLOOKUP formula with multiple criteria

    Worksheet name : ORDER

    Cell F5 formula , Drag down

    HTML Code: 

+ 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. Multiple criteria for XLOOKUP formula
    By mikehk in forum Excel General
    Replies: 1
    Last Post: 06-28-2021, 05:50 PM
  2. Replies: 3
    Last Post: 06-24-2021, 10:31 AM
  3. Multiple Xlookup or Vlookup help PLEASE!
    By Traffs in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-18-2021, 04:02 AM
  4. [SOLVED] XLOOKUP to return cell based on multiple criteria in single column
    By mikehay08 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-24-2021, 02:59 PM
  5. [SOLVED] Xlookup multiple columns
    By sunboy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-12-2021, 11:45 AM
  6. XLOOKUP - multiple look up over 2 tabs,
    By pmw19800 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-30-2021, 02:54 PM
  7. [SOLVED] Multiple outputs on Xlookup
    By DerekJ in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-12-2020, 03:28 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