Formula

B

Bill

Can someone help me with a formula.

If someone types a 1 into block A1, I want block C1 to say "GREEN".
If they type a 2 in block A1, I want block C1 to say "Blue".
If they type a 3 in block A1, I want block C1 to say "Black".
And so on.

Can anyone help?

Bill
 
B

BenjieLop

<< The function you want is CHOOSE()

In C1 type:

=CHOOSE(A1,"Green","Blue","Black")>>

Using the above CHOOSE formula will yield a VALUE error if a numbe
besides 1, 2 or 3 is entered in A1.

Perhaps the old fashioned nested IFs will do,i.e.,

=if(A1=1,"Green",if(A1=2,"Blue",if(A1=3,"Black","")))

The above nested IF formula will return a blank in cell C1 if any othe
number (besides 1, 2, 3) is entered in Cell A1.

OR to be more descriptive, perhaps Cell C1's formula should be

=if(A1=1,"Green",if(A1=2,"Blue",if(A1=3,"Black","Enter number between
and 3 only please!!!"))
 
D

Don Guillett

choose could still be used, if desired with
=IF(AND(F5>0,F5<4),CHOOSE(F5,"a","B","C"),"")
 
Top