# Nested IF statement with 2 lookups

1. ## 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

2. ## 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)))),"")

3. ## 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"))),"")

##### Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### 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