+ Reply to Thread
Results 1 to 3 of 3

Nested IF statement with 2 lookups

  1. #1
    Registered User
    Join Date
    11-14-2018
    Location
    Colorado
    MS-Off Ver
    365
    Posts
    16

    Nested IF statement with 2 lookups

    Hello,

    I am having trouble with a nested IF statement when I try to add a second vlookup. The error is too many arguments.

    I am trying to pull the case counts for materials, but the unit of measure has three options. Therefore, I need 2 vlookups. 1 for "PAC" UoM, 1 for "EA" UoM, then just returning value if "CAR" since already cases.

    This is currently working for just "EA" and "CAR" with:

    Please Login or Register  to view this content.
    There are blank rows in the data, but I dont want a bunch of #N/A, so I have that returning blank. If the material is not listed on case count tab, I have it returning "MISSING" so we can fix.

    The new UoM "PAC" inner pack qtys will now be columns D and E in case counts tab.

    Attached is a sample sheet, anyone have an idea on how to add the "PAC" lookup to existing formula?

    I appreciate you all!

    Thanks!
    Luke
    Attached Files Attached Files
    Last edited by MrLukeSkyGuy; 10-25-2019 at 05:32 PM.

  2. #2
    Forum Expert Sambo kid's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    Office 365 ProPlus - work; 2012 for Mac at home
    Posts
    6,163

    Re: Nested IF statement with 2 lookups

    is this what you want...
    =IF(ISBLANK(O2)=FALSE,IF(OR(H2="CAR",H2="EA"),G2,IF(ISNA(G2/VLOOKUP(I2,'Case Counts'!A:B,2,0)),"MISSING",(G2/VLOOKUP(I2,'Case Counts'!A:B,2,0)))),"")
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    11-14-2018
    Location
    Colorado
    MS-Off Ver
    365
    Posts
    16

    Re: Nested IF statement with 2 lookups

    Kept messing with it and finally got this to work:

    =IF(ISBLANK(O2)=FALSE,IF(H2="CAR",G2,IF(H2="PAC",(G2/VLOOKUP(I2,'Case Counts'!D:E,2,0)),IF(H2="EA",(G2/VLOOKUP(I2,'Case Counts'!A:B,2,0)),"MISSING"))),"")

+ 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