IF statement with range of numbers

ha95148

New Member
Joined
May 10, 2016
Messages
30
Office Version
  1. 365
Hoping you could help me with an IF statement with range of numbers.
For example, per the table below, if my value is between the low range (i.e. 137) and high range (i.e. 227), i want Excel to return "Level2", and so on

low
high
level #
137

<colgroup><col width="64"></colgroup><tbody>
</tbody>
227

<colgroup><col width="64"></colgroup><tbody>
</tbody>
Level2

<colgroup><col width="64"></colgroup><tbody>
</tbody>
228

<colgroup><col width="64"></colgroup><tbody>
</tbody>
318

<colgroup><col width="64"></colgroup><tbody>
</tbody>
Level3

<colgroup><col width="64"></colgroup><tbody>
</tbody>
319

<colgroup><col width="64"></colgroup><tbody>
</tbody>
456

<colgroup><col width="64"></colgroup><tbody>
</tbody>
Level4

<colgroup><col width="64"></colgroup><tbody>
</tbody>
457

<colgroup><col width="64"></colgroup><tbody>
</tbody>
639

<colgroup><col width="64"></colgroup><tbody>
</tbody>
Level5

<colgroup><col width="64"></colgroup><tbody>
</tbody>

<tbody>
</tbody>
 

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.
assuming your table starts at cell A1

in cell C2 enter this formmula

=IF(AND(A2>=137,B2<=227),"Level2",IF(AND(A2>=228,B2<=318),"Level3",IF(AND(A2>=319,B2<=456),"Level4",IF(AND(A2>=457,B2<=639),"Level5","NO CRITERIA MATCH"))))

and drag down
 
Upvote 0

Forum statistics

Threads
1,215,454
Messages
6,124,933
Members
449,195
Latest member
Stevenciu

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