ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   LookUp Problem (https://www.excelbanter.com/excel-worksheet-functions/114218-lookup-problem.html)

LostNFound

LookUp Problem
 
I need to look at a single cell and it will contain a value from 1-1000, I
want to return different letters based on the cell value. Using ranges for
different letters

Example - 1-100 will return an A, 101-150 will return a B, etc. all the way
to 1000 in increments of 50.

The column C will contain the a number between 1 and 1000 and I want to
return a letter based on the example above in a different column.

Max

LookUp Problem
 
One way ..

Assuming lookup values entered in A1 down,

Put in say, B1:
=IF(A1<1,"",VLOOKUP(A1,{1,"A";101,"B";151,"C";201, "D";251,"E";301,"F";351,"G";401,"H";451,"I";501,"J ";551,"K";601,"L";651,"M";701,"N";751,"O";801,"P"; 851,"Q";901,"R";951,"S";1001,"T"},2))
Copy down
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"LostNFound" wrote in message
...
I need to look at a single cell and it will contain a value from 1-1000, I
want to return different letters based on the cell value. Using ranges for
different letters

Example - 1-100 will return an A, 101-150 will return a B, etc. all the
way
to 1000 in increments of 50.

The column C will contain the a number between 1 and 1000 and I want to
return a letter based on the example above in a different column.




Biff

LookUp Problem
 
Try this:

=IF(OR(C1="",C11000),"",IF(C1<101,"A",CHAR(64+CEI LING(C1,50)/50-1)))

Biff

"LostNFound" wrote in message
...
I need to look at a single cell and it will contain a value from 1-1000, I
want to return different letters based on the cell value. Using ranges for
different letters

Example - 1-100 will return an A, 101-150 will return a B, etc. all the
way
to 1000 in increments of 50.

The column C will contain the a number between 1 and 1000 and I want to
return a letter based on the example above in a different column.





All times are GMT +1. The time now is 09:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com