Thread: Functions
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Functions

How about using a Vlookup instead. Create a Table something like this in
A1:B4...

0 8.5
100 16
200 20
300 29.5
....

And then use a formula like...
=VLOOKUP(D1, A1:B4, 2, TRUE)
Place this in Cell E1 and the value you want to find in D1...
It will find the closest match for you. This should work better than the
nested if statements which you can only nest 7 deep (Limit of Excel. You can
get around it using named ranges but it is not really necessary in this case)
--
HTH...

Jim Thomlinson


"ITilerate" wrote:

thks for reply I guess my explanation wasn't proper here is the data again:
column a contain these values 45,87,100,185,255,598,888,1000,1199,1400 and
the vales that I wish to show in a column next to it are respectfully
8.5,8.5,16,16,20,29.5,33,39.5,39.5,42.5,
--
ITilerate


"Bob Umlas" wrote:

=INT(A1/100)+1
and fill down??

"ITilerate" wrote in message
...
I am having a problem writing an IF function and was wondering if there is

a
easy way to accoplish my task as follows: a range of 20 different values

in a
column and I want to assign a different value in the column next to those
values based on the range in the first column ie: if value in rows 1 to 20

of
column a is 100 to 2000 respectfully and the values I want to show in the
next column are 1 to 20 ?? This is an example of what I am trying to do
if(a1<=100,1,if(a1100<=200,2,if(a1=200<300,3))) but it doesn't return

the
answer I look for when the value is between the whole numbers as in 1.2 or
1.5 as an example......
--
ITilerate