PC Review


Reply
Thread Tools Rate Thread

assigning a letter in a cell from a range of numbers in another ce

 
 
=?Utf-8?B?ZGJh?=
Guest
Posts: n/a
 
      23rd May 2007
In creating a price list, I am looking for a way for a cell to read another
cell and determine if the number in that cell is between one number and
another. Depending on the range, I want to assign that cell a letter. For
ex:

if A1 is between 1 and 9, then cell C1 would = a, but if it is between 10
and 15, then cell C1 would = b, but if it is between 16 and 20, then cell C1
would = c, etc. etc.

Can anyone help me with this?
--
dba
one day at a time
 
Reply With Quote
 
 
 
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      23rd May 2007
A very easy way is to use a VLOOKUP table. No VBA is required and the ranges
do not to be uniform.
--
Gary''s Student - gsnu200723
 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      23rd May 2007
=if(A1<1,"",if(A1<=9,"a",if(A1<=15,"b",if(A1<=20,"c","d"))))

you can nest 7 deep.

You can also explore a lookup table using vlookup.
in C2226

1 a
10 b
15 c
21 d
43 e

=if(Or(A1<1,A1="",istext(A1),"",VLOOKUP(A1,$C$22:$D$26,2,TRUE))


--
Regards,
Tom Ogilvy

"dba" wrote:

> In creating a price list, I am looking for a way for a cell to read another
> cell and determine if the number in that cell is between one number and
> another. Depending on the range, I want to assign that cell a letter. For
> ex:
>
> if A1 is between 1 and 9, then cell C1 would = a, but if it is between 10
> and 15, then cell C1 would = b, but if it is between 16 and 20, then cell C1
> would = c, etc. etc.
>
> Can anyone help me with this?
> --
> dba
> one day at a time

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assigning Value to a Range of Numbers jrs Microsoft Access Getting Started 1 7th Aug 2009 04:29 AM
Assigning a point value to a range of numbers wmb Microsoft Excel Misc 2 7th Aug 2008 03:26 PM
Assigning cell value to range variable Raj Microsoft Excel Programming 2 31st Jul 2008 05:44 PM
Convert range of numbers to letter JB Microsoft Excel Discussion 10 2nd Mar 2006 10:33 PM
convert range numbers to letter JB Microsoft Access 2 1st Mar 2006 04:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:00 PM.