IF and AND functions combined for several ranges

Pickle Lily

New Member
Joined
Feb 28, 2018
Messages
1
I would like to write a formula that assigns a number to a cell value based on a range of numbers. For example, I have a column that calculates 'risk percentage', which I then need to assign to a 'risk ranking' as per the table below:

Risk RankingPercentage Range
1<10%
210-20%
320-40%
440-60%
5>60%

<tbody>
</tbody>


I have written the following formula: =IF(AND(G22>P13,G22<=Q13),O13,R13), where:

G22 = test value (e.g. risk percentage)
P13 = bottom of percentage range (e.g. 0%)
Q13 = top of percentage range (e.g. 10%)
O13 = result if true (e.g. risk ranking)
R13 = result if false (e.g. -)

I have clumsily spread this out over five columns - one for each percentage range, but is there a way to combine this into one formula / cell?

Many thanks,
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Swap the order slightly and you can use a VLOOKUP:


Book1
ABCDE
1Percentage Lower BoundRisk RankingTest ValueRisk
20%115%2
310%2
420%3
540%4
660%5
Sheet1
Cell Formulas
RangeFormula
E2=VLOOKUP($D2,$A$2:$B$6,2,TRUE)


WBD
 
Upvote 0

Forum statistics

Threads
1,215,390
Messages
6,124,667
Members
449,178
Latest member
Emilou

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