Hi Eric
There are a few ways to do this, but the one I prefer for ease of reading is:
=IF(ISNA(VLOOKUP(255,A1:C16,3,FALSE)),0,VLOOKUP(255,A1:C16,3,FALSE))
Dave
OzGrid Business Applications
Use the ISNA(expression) function in an IF statement, ISNA returns true if the expression is true.
eg. IF(ISNA(your vlookup),0,(vlookup...))
In the above example if "your vlookup" returns #N/A Excel will display a zero, otherwise Excel will carry out the vlookup as normal.
Hope this helps. E-mail me if you need further explanation
Richie
=If(ISNA(VLOOKUP... Works fine but is want to save time use the match function it's works faster on great blocks of data.
=IF(ISERROR(MATCH(255,A1:C16,0)),0,VLOOKUP(255,A1:C16,3,FALSE))
====================================
Malcolm
You can't use MATCH with an m X n matrix where m>1 and n>1.
I think you're hinting at the following use:
=IF(ISERROR(MATCH(255,A1:A16,0),0,VLOOKUP(255,A1:C16,3,0))
Or:
=IF(ISNUMBER(MATCH(255,A1:A16,0)),VLOOKUP(255,A1:C16,3,0),0)
By the way, it appears to me as a pertinent suggestion.
Aladin