View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jimmy jimmy is offline
external usenet poster
 
Posts: 59
Default Looking up a value within a range of 3 letter or number codes...

Hello,

I'm trying to determine the best way to return a value or string using an
if-then statement. The current formula I have looks like this:

=IF(B3=ccode,"West","East")

So basically, if whatever is in the cell B3 (let's say its "ABC") is also in
the range named "ccode", then it returns the string "West".

However, I know the sytax of this formula is incorrect because I receive a
"#Name?" error.

Any thoughts?