![]() |
assigning a letter in a cell from a range of numbers in another ce
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 |
assigning a letter in a cell from a range of numbers in another ce
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 |
assigning a letter in a cell from a range of numbers in another ce
=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 C22:D26 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 |
All times are GMT +1. The time now is 02:37 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com