View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default IF Function Does Not Work With Cell Reference

Works in all versions, I suspect the OP has some hidden space(s) in A1

=IF(TRIM(A1)="<","Curly","Larry")

would fend off spaces

--

Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
"It is a good thing to follow the first law of holes;
if you are in one stop digging." Lord Healey


"Ardus Petus" wrote in message
...
Works by me (Excel 2000 - Win XP Pro)

HTH
--
AP

"Gary" a écrit dans le message de news:
...
Say you have a "<" sign in cell A1

And cell B1 contains "=A1".

Now, if I use an IF function that says =IF(A1="<","Curly","Larry") I
get Curly.

But if the IF function references B1, I get Larry.

So it seems that EXCEL 2003 is not smart enough to know that the value
of B1 is actually "<".

How can I fix this so that when I reference Cell B1 I get Curly.

Thanks,

Gary