Return a value to a cell depending its range

Garjo

New Member
Joined
Jul 7, 2017
Messages
7
I'm hoping someone has the answer.

I Have a value within a cell to which I would like to check against a number of ranges and return a new value a shown below.

14 = 1


<tbody>
</tbody>


Less than 25 =


1
Between 25-75 =


2
Between 75-150 =


3
Between 150-250 =


4
Above 250 =


5

<tbody>
</tbody>

Which fuction should I be using within my formula
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
you can use a nested if() function like this, let say the value is in A1

-if(A1<25,1,if(A1<=75,2,if(A1<=150,3,if(A1<=250,4,5))))
 
Upvote 0
Assuming your values are never negative, you can also use this formula...

=LOOKUP(A1,{0,26,76,151,251},{1,2,3,4,5})
 
Upvote 0
Cheers Guys that works a treat the only issues im getting if the range is 0,1.11,1.12..... I always get a number 5 when using the lookup function
 
Upvote 0
Sorry my misstake i was pointing to the wrong cell. Thankyou for taking the time to help.
 
Upvote 0

Forum statistics

Threads
1,214,936
Messages
6,122,340
Members
449,079
Latest member
rocketslinger

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top