View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
colette colette is offline
external usenet poster
 
Posts: 16
Default Lookup function help please

Many Thanx Fred

Colette

"Fred Smith" wrote:

Your problem is the quote marks around the "1". Quotes make the cell text.
Without quotes it's a number, and you need a number in your Lookup
statement. So change AU17 to:
=IF(VC1="U",1,IF(VC1="Z",2,IF(VC1="E",3, IF(VC1="P",4,""))))
I also changed your last IF statement to return nothing ("") if the
condition is not met. Otherwise you would get FALSE.
The fact that there are spaces in the IF statement shown tells us you
manually typed the formula into your e-mail. This is fraught with error.
Always cut and paste your formula, to avoid typing errors.

Finally, it's very likely your Lookup formula should be:
=LOOKUP(AU17,{1,2,3,4},{.175,0,0,0.05})

Regards,
Fred

"Colette" wrote in message
...
I'm trying to use the following LookUp function but it keeps on coming up
as
#N/A for option 1 but seems to work for 2,3 and 4, can someone tell me
where
I'm going wrong

=LOOKUP(AU17,{1,2,3,4},{".175","0","0","0.05"})

The AU17 cell has the following formula in it, and it works - this is for
VAT
=IF(VC1="U","1", IF(VC1="Z",2,IF(VC1="E",3, IF(VC1="P",4,))))

Many Thanks for your help


.