+ 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 Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    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)

Similar Threads

  1. Nested IF statement error. Nested True statement is not triggering
    By Lucas7040 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-26-2016, 11:41 AM
  2. [SOLVED] Help with nested lookups
    By cweiser in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-24-2013, 07:43 PM
  3. Lookups for Financial Statement Formatting
    By amartino44 in forum Excel General
    Replies: 2
    Last Post: 12-17-2012, 03:09 PM
  4. Financial Statement Lookups
    By amartino44 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-12-2012, 08:05 PM
  5. Can I use nested IFs or LookUps or Something Else
    By ms_guy99 in forum Excel General
    Replies: 6
    Last Post: 08-25-2010, 05:11 PM
  6. nested lookups or ???
    By nedezero in forum Excel General
    Replies: 7
    Last Post: 12-29-2008, 01:34 PM
  7. If statement with multiple lookups
    By elew69811 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-05-2007, 08:09 PM

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