I can't get my IF function right

B

burp

I want this:

I enter a number in cell A1. If the number ends in 1, nothing appears
in cell B1. If the number in A1 does not end in a 1 a message appears
in B2 that reads "You messed up - the number in cell A1 must end in a
1".

How can I do this?
 
T

The Grinch

in cell b1 type the following formula...

=if(right(A1,1)=1,"","you messed up"
 
C

CLR

=IF(RIGHT(A1,1)*1=1,"","you messed up-the number in cell A1 must end in a
1")

Vaya con Dios,
Chuck, CABGx3
 
C

CLR

Glad it worked for you, thanks for the feedback.......

The "RIGHT" function turns the result into TEXT........the *1 turns it back
into a number, which it has to be to compare to "=1"........


Vaya con Dios,
Chuck, CABGx3
 
B

burp

Got'cha. Thanks for the help.

-----


Glad it worked for you, thanks for the feedback.......

The "RIGHT" function turns the result into TEXT........the *1 turns it back
into a number, which it has to be to compare to "=1"........


Vaya con Dios,
Chuck, CABGx3
 
Top