I need to combine the following
=IF(B2="SUSP","Suspended",A2) and =VLOOKUP(A2,Lookup!AB:AC,2,0)
explanation: If SUSP isn't found in cell B2 then match value from column AB in 'lookup' tab and then return the value from AC in the 'lookup' tab.
CodePudding user response:
Excel allows the "Nesting" of formula, so just put the VLOOKUP in the False position. That way when it does not equal "SUSP" it will run the VLOOKUP:
=IF(B2="SUSP","Suspended",VLOOKUP(A2,Lookup!AB:AC,2,0))
If B2
does eqaul "SUSP" the IF will not even run the VLOOKUP.
CodePudding user response:
Is this what you're looking for?
=IF(VLOOKUP(A2, Lookup!AB:AC, 2, 0) = "SUSP", "Suspended", A2)