different numbers to return different letters

KenWright64

New Member
Joined
Nov 16, 2005
Messages
8
I want to return a choice of 4 letters(w,x,y,z) in one cell depending upon the result of a number in another cell. For example - if cell A2 was between 1 & 5 I want to return the letter w in cell C2, If cell A2 was between 6 & 10 I
want to return letter x in C2, I thank you as all i get is true/false with If statements
 

Some videos you may like

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Tazguy37

MrExcel MVP
Joined
May 28, 2004
Messages
4,237
Welcome to MrExcel Board!

How about this?:

=IF(AND(A2>=1,A2<=20),CHAR(QUOTIENT(A2-1,5)+119),"Not in range")

Hope that helps!
 

Yogi Anand

MrExcel MVP
Joined
Mar 12, 2002
Messages
11,454
KenWright64 said:
I want to return a choice of 4 letters(w,x,y,z) in one cell depending upon the result of a number in another cell. For example - if cell A2 was between 1 & 5 I want to return the letter w in cell C2, If cell A2 was between 6 & 10 I
want to return letter x in C2, I thank you as all i get is true/false with If statements
Hi KenWright64:

Welcome to MrExcel Board!

You mean something like ...

=IF(AND(A2>=6,A2<=10),"x",IF(AND(A2>=1,A2<=5),"w"))
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
47,473
Office Version
  1. 365
Platform
  1. Windows
KenWright64

Not sure where y and z come into it but this structure might also be some use:
=LOOKUP(A2,{1,6,11,16},{"w","x","y","z"})
 

Watch MrExcel Video

Forum statistics

Threads
1,118,081
Messages
5,570,092
Members
412,310
Latest member
mark884
Top