IF function

V

VILLABILLA

I have a cell -A1-, it can be set at either Yes or No, this is don
with use of a Validation list.

I want another cell -C1- to show 'Price Change' when A1 shows Yes an
it should say 'No Change' when cell A1 shows No.

I tried this formula in C1:

=IF(A1="Yes";"Price Change";"No Change")

It doesn't work , C1 just shows 'No Change' all the time and it doesn'
matter if I set the cell A1 on Yes or No...

What am I doing wrong
 
F

Frank Kabel

Hi
your formula looks o.k. You may check if there're no spaces in your
list for cell A1. E.g. a trailing space. you may try the following
formula:
=IF(TRIM(A1)="Yes";"Price Change";"No Change")
 
M

Martin

Hi,

Try using commas instead of semi-colons. formula should the
read

=if(A1="YES","PRICE CHANGE","NO CHANGE"
 
F

Frank Kabel

Hi Martin
I doubt this is the problem as if the OP had to use comas the formula
had thrown an error. I assume the OP uses the semicolon as delimiter
:)
 
V

VILLABILLA

Hi,

Thanks Martin for your reply but I guess the comma thing depends on
what Excel edition you use, I use 2000 so commas cant be used for
that....

Yes, it was something in the validation that messed it up and with
adding TRIM in the formula it works, thanks a lot Frank! (again)

Happy Easter in advance!
 
A

A.W.J. Ales

Villabilla,

To add to Franks solution.

In cell A1 : Is Data / Validation / List set to Yes and No or to "Yes" and
"No".
If it is the latter changing it to Yes and No solves your problem.

--
Regards,
Auk Ales

* Please reply to this newsgroup only *
* I will not react on unsolicited e-mails *

Frank Kabel said:
Hi
your formula looks o.k. You may check if there're no spaces in your
list for cell A1. E.g. a trailing space. you may try the following
formula:
=IF(TRIM(A1)="Yes";"Price Change";"No Change")
 
V

VILLABILLA

A.W.J. Ales,

Thanks a lot for your comment.

In this case it is already set without "", however, I'll keep it i
mind for in the future..
 
Top