That's exactly what I would like to do:
Say cell B2 has a number of 233.
I need cell B3 to read "2" because it is within the range of 100-249.
If the number were 98, it should read a "1" because it is within the range
of 1-99.
A number of 250-399 would read "3", and the range goes on with bigger
numbers located in B2.
The formula below will not work because it is not based purely on 100's.
Thank you for your response though.
> Hi
>
[quoted text clipped - 16 lines]
> >
> > Any assistance would be greatly appreciated.
Sandy Mann - 16 Oct 2006 21:46 GMT
Hi Astrad459,
You still don't give the whole set of ranges that you want to test for.
With the upper limit of every range, ie from the example you have given 99,
249, 399, try:
=SUM(--(B2>{0,99,249,399,499,549,749,999}))
(The 499,549,749 & 999 are my *guesses* at further range limits)

Signature
HTH
Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings
sandymann2@mailinator.com
Replace@mailinator.com with @tiscali.co.uk
> That's exactly what I would like to do:
>
[quoted text clipped - 28 lines]
>> >
>> > Any assistance would be greatly appreciated.
joeu2004@hotmail.com - 17 Oct 2006 00:07 GMT
> That's exactly what I would like to do:
> Say cell B2 has a number of 233.
> I need cell B3 to read "2" because it is within the range of 100-249.
> [....]
> A number of 250-399 would read "3", and the range goes on with bigger
> numbers located in B2.
Non sequitur! Previously, you said that 101-250 would return 2, not
100-249. So 100 should convert to 1 and 250 should convert 2,
according to your original specifications.
Since your specifications are so ambiguous, I suggest that you adapt
the following paradigm to your specific needs, whatever they are:
=MATCH(MAX(0,A1), {0,1,101,251,300}, 1) - 1
The key elements are: (a) the "{...}" array should contain each of the
lower bounds of your ranges; and (b) "1" in the 3rd argument of MATCH()
says "match the largest value in the array less than or equal to the
look-up value.
The above MATCH() will return 1 greater than your intended results,
which is why I subtract 1 afterwards. That allows for A1<=0, A1 is
empty, and A1 is text.
If you do not need that much robustment -- that is, if A1 is always 1
or greater -- you can use the following simpler paradigm:
=MATCH(A1, {1,101,251,300}, 1)