subby
New Member
- Joined
- Sep 24, 2010
- Messages
- 11
Hi All,
I need to figure out how to avoid nested IF-s because I have to determine if the value of cell A1 falls between one of the 20-ish ranges of values, and and return a value based on the result
So the cell A1 can contain any integer between 0 and 375
the ranges for which I have to determine if A1's value falls into are (inclusive): 0-14, 15-29, 30-44, 45-59, 60-74, 75-89, 90-104, 105-119, 120-134, 135-149, 150-164, 165-179, 180-194, 195-209, 210-224, 225-239, 240-254, 255-269, 270-284, 285-299
For example if A1 is 229, then the result should be the cell that is below the one that says "225-239", which is 17 500.
Can somebody please suggest a fromula OR VBA solution for me?
I need to figure out how to avoid nested IF-s because I have to determine if the value of cell A1 falls between one of the 20-ish ranges of values, and and return a value based on the result
So the cell A1 can contain any integer between 0 and 375
the ranges for which I have to determine if A1's value falls into are (inclusive): 0-14, 15-29, 30-44, 45-59, 60-74, 75-89, 90-104, 105-119, 120-134, 135-149, 150-164, 165-179, 180-194, 195-209, 210-224, 225-239, 240-254, 255-269, 270-284, 285-299
For example if A1 is 229, then the result should be the cell that is below the one that says "225-239", which is 17 500.
Can somebody please suggest a fromula OR VBA solution for me?