SOLVED

using IF(ISERROR) statements with true/false outcome in an IF statement

Copper Contributor

Hello and Greetings,

 

I have two formulas:

 

=IF(ISERROR(VLOOKUP(D6,'SKU list'!J:J,1,FALSE)),FALSE,TRUE)

=IF(ISERROR(VLOOKUP(D196,CTO!A:A,1,FALSE)),FALSE,TRUE)

 

Both work perfectly and return "false" for items not in the referenced lists.

 

What I want to do is put them together in a new IF statement that says:

 

If (cell reference)="Accessories", use stmt 1, otherwise use stmt 2.

 

I did this but it doesn't work:

 

=IF(FT2="Accessories",(IF(ISERROR(VLOOKUP(D2,'SKU list'!J:J,1,FALSE)),FALSE,TRUE),(IF(ISERROR(VLOOKUP(D178,CTO!A:A,1,FALSE)),FALSE,TRUE))))

 

The error says one of the values is the wrong data type.

 

Any ideas?

 

Thanks!

3 Replies
best response confirmed by 4ck3r360 (Copper Contributor)
Solution

Hi,

 

Your current formula is

=IF(FT2="Accessories",
   (
      IF(ISERROR(VLOOKUP(D2,'SKU list'!J:J,1,FALSE)),FALSE,TRUE),
      (IF(ISERROR(VLOOKUP(D178,CTO!A:A,1,FALSE)),FALSE,TRUE))
   )
)

If you update on

=IF(FT2="Accessories",
   IF(ISERROR(VLOOKUP(D2,'SKU list'!J:J,1,FALSE)),FALSE,TRUE),
   IF(ISERROR(VLOOKUP(D178,CTO!A:A,1,FALSE)),FALSE,TRUE)
)

perhaps it will work, I didn't test

Yes! That's it! I had an extra set of parenthesis that changed the formula.

 

Thank you! @Sergei Baklan

1 best response

Accepted Solutions
best response confirmed by 4ck3r360 (Copper Contributor)
Solution

Hi,

 

Your current formula is

=IF(FT2="Accessories",
   (
      IF(ISERROR(VLOOKUP(D2,'SKU list'!J:J,1,FALSE)),FALSE,TRUE),
      (IF(ISERROR(VLOOKUP(D178,CTO!A:A,1,FALSE)),FALSE,TRUE))
   )
)

If you update on

=IF(FT2="Accessories",
   IF(ISERROR(VLOOKUP(D2,'SKU list'!J:J,1,FALSE)),FALSE,TRUE),
   IF(ISERROR(VLOOKUP(D178,CTO!A:A,1,FALSE)),FALSE,TRUE)
)

perhaps it will work, I didn't test

View solution in original post