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

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
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

<tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]<5[/TD]
[TD="align: center"]<10[/TD]
[TD="align: center"]<15[/TD]
[TD="align: center"]<20[/TD]
[TD="align: center"]<25[/TD]
[TD="align: center"]Check[/TD]
[TD="align: center"]Result[/TD]

[TD="align: center"]2[/TD]
[TD="align: center"]22[/TD]
[TD="align: center"]33[/TD]
[TD="align: center"]44[/TD]
[TD="align: center"]55[/TD]
[TD="align: center"]66[/TD]
[TD="align: center"]22[/TD]
[TD="align: center"]66[/TD]

[TD="align: center"]3[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]

[TD="align: center"]4[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]

[TD="align: center"]5[/TD]
[TD="align: center"]<5[/TD]
[TD="align: center"]<10[/TD]
[TD="align: center"]<15[/TD]
[TD="align: center"]<20[/TD]
[TD="align: center"]<25[/TD]
[TD="align: center"]Check[/TD]
[TD="align: center"]Result[/TD]

[TD="align: center"]6[/TD]
[TD="align: center"]22[/TD]
[TD="align: center"]33[/TD]
[TD="align: center"]44[/TD]
[TD="align: center"]55[/TD]
[TD="align: center"]66[/TD]
[TD="align: center"]11[/TD]
[TD="align: center"]44[/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<tbody>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]G2[/TH]
[TD="align: left"]=IFERROR(CHOOSE(INT(F2/5)+1,A2,B2,C2,D2,E2),"ERROR")[/TD]
[/TR]
[TR]
[TH="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]G6[/TH]
[TD="align: left"]=IF(F6<5,A6,IF(F6<10,B6,IF(F6<15,C6,IF(F6<20,D6,IF(F6<25,E6,"ERROR")))))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
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,224,743
Messages
6,180,687
Members
452,994
Latest member
Janick

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