View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default how to return "n/a" when no match is found.

If #N/A is okay, juust use

=VLOOKUP(CONCATENATE($A61 & " schg"),CurrentTaxRates,2,FALSE)

else use

=IF(ISNA(VLOOKUP(CONCATENATE($A61 & "
schg"),CurrentTaxRates,2,FALSE)),"N/A",
VLOOKUP(CONCATENATE($A61 & " schg"),CurrentTaxRates,2,FALSE))

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Loni - RWT" wrote in message
...
I've got a workbook w/ one sheet that has downloaded fuel tax rates named
CurrentTaxRates. On another sheet in the workbook, I'm trying to obtain
the
tax rates via lookup functions for particular states. Some states, but
not
all, have a surcharge rate in addition to the tax rate. I have the
following
formula which is giving me the surcharge rate for the states that have
one.
However, if a state does not have a surcharge rate, it's giving me an
error -
#VALUE! How do write it so that if a state does not have a surcharge
rate,
it returns "N/A" ? Thanks for your help

=IF(VLOOKUP(CONCATENATE($A61 & "
schg"),CurrentTaxRates,2,FALSE),NA,VLOOKUP(CONCATE NATE($A61 & "
schg"),CurrentTaxRates,2,FALSE))