Formula Help - If Cell Falls Within Certain Range

jonnyd3388

New Member
Joined
Sep 1, 2019
Messages
2
Hi! So sorry if a question like this has been posed before, I'm sure it will have been covered at some stage .. I'm looking to create a formula within a work spreadsheet as follows;

If the value of a cell is lower than 5 then new cell is A, if it is between 5 and 9.9 then B, if it is between 10 and 14.9 then C and so on (5 in total).

Thanks for any help!
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Hi!

Here's a couple of methods. The CHOOSE assume no number to check will be 0.000000001 away from the next range (e.g. 4.999999999 is treated as 5).

ABCDEFG
1<5<10<15<20<25CheckResult
222334455662266
3
4
5<5<10<15<20<25CheckResult
622334455661144

<tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
G2=IFERROR(CHOOSE(INT(F2/5)+1,A2,B2,C2,D2,E2),"ERROR")
G6=IF(F6<5,A6,IF(F6<10,B6,IF(F6<15,C6,IF(F6<20,D6,IF(F6<25,E6,"ERROR")))))

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
My take on this


Book1
AB
1ScoreGrade
21A
34A
45B
56B
69B
710C
811C
914C
1015D
1116D
1219D
1320E
1421E
1524E
1625
1726
Test
Cell Formulas
RangeFormula
B2=LOOKUP(A2,{0,5,10,15,20,25},{"A","B","C","D","E",""})
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,331
Members
449,077
Latest member
jmsotelo

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