mercredi 18 décembre 2019

Multiple If conditions with Vlookup and IFNA involved

I am scratching my head and just cannot find the solution for hours. I need the excel to use Cell D(this is the result from another Vlookup) as the result OR Cell A + Cell B as the other result based on the following. (Not really expert with Excel, but do Understand some logic)

  1. if vlookup from column y return " ", then Vlookup another table to get result of CELL D(Show " "if this Vlookup is #N/A)

  2. if Vlookup from column y return #N/A, the Vlookup another table to get result of Cell D (Show " " if this Vlookup is #N/A)

  3. if Vlookup from column Z return " ", the Vlookup another table to get result of Cell D (Show " ",if this Vlookup is #N/A)

  4. if Vlookup from column Z return #N/A, the Vlookup another table to get result of Cell D (Show " "if this Vlookup is #N/A)

if any if the above returns other than " " or #N/A, then just do CELL A + CELL B = Cell D

Here is an attempt but unfortunately it doesn't work:

=if(and(vlookup(A18,DEALS!A:P,16,false)<>""),F18-E18,
 if(and(vlookup(A18,DEALS!A:P,14,false)<>""),F18-E18, 
 if(and(IFNA(vlookup(A18,DEALS!A:P,16,false))=false),F18-E18, 
 if(and(IFNA(vlookup(A18,DEALS!A:P,14,false))=false),F18-E18,
 "another Vlookup" )))) 

Note: Edited in as OP does not have edit rights. Line-breaks added to formula for legibility.

Aucun commentaire:

Enregistrer un commentaire