Link to home
Start Free TrialLog in
Avatar of Bob Stamm
Bob StammFlag for United States of America

asked on

"If statement" results in a #N/A

"If statement" results in a #N/A

If cell Z38 = "" I want the result to be blank.  If not blank it will place the proper value from the vlookup table.  Formula works fine with a value.  Empty "Z38" results in a #N/A.

=IF(VLOOKUP(Z38,AK4:AL15,2,FALSE)="","",VLOOKUP(Z38,AK4:AL15,2,FALSE))
ASKER CERTIFIED SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Norie
Norie

If on Excel 2007 or later try this:

=IFERROR(VLOOKUP(Z38,AK4:AL15,2,FALSE), "")
You may simply use this...
=IF(Z38="","",IF(VLOOKUP(Z38,AK4:AL15,2,FALSE)="","",VLOOKUP(Z38,AK4:AL15,2,FALSE)))

Open in new window

OR this
=IF(Z38="","",VLOOKUP(Z38,AK4:AL15,2,FALSE))

Open in new window


Though another way is to wrap your formula with IFERROR like below but the disadvantage is in that case, the whole formula will be evaluated even if the Z38 is blank which is not required.
=IFERROR(VLOOKUP(Z38,AK4:AL15,2,FALSE),"")

Open in new window

Avatar of Bob Stamm

ASKER

That was just what i needed.  Thank you!