an if formula with multiple conditions

Tripleseas

Board Regular
Joined
Jul 12, 2022
Messages
87
Office Version
  1. 2013
Platform
  1. Windows
Hello community,

i want to write an if formula that will add a type column based on the rang of % as shown below :


Classeur1
ABCDEFG
1PercentageType
2100%
3100%Type
499%Equal to 100%100%
597%Between 81% and 99%81%-99%
694%Between 61% and 80%61%-80%
791%Between 40% and 60%40%-60%
890%Less than miniumumall percentage below 39%
989%
1084%
1183%
1282%
1382%
1482%
1582%
1682%
1779%
1879%
1977%
2077%
2176%
2276%
2374%
2474%
2574%
2673%
2773%
2872%
2971%
3071%
3170%
3270%
3369%
3469%
3568%
3668%
3768%
3867%
3967%
4067%
4167%
4266%
4366%
4464%
4564%
4664%
4764%
4863%
4963%
5062%
5162%
5262%
5361%
5461%
5560%
5660%
5760%
5859%
5959%
6059%
6159%
6258%
6358%
6458%
6557%
6657%
6757%
6857%
6957%
7057%
7157%
7256%
7356%
7456%
7556%
7656%
7756%
7855%
7955%
8055%
8155%
8255%
8355%
8454%
8554%
8654%
8754%
8854%
8954%
9054%
9154%
9253%
9353%
9453%
9553%
9653%
9753%
9853%
9952%
10052%
10152%
10252%
10352%
10452%
10551%
10651%
10750%
10850%
10950%
11050%
11150%
11250%
11350%
11450%
11550%
11650%
11750%
11850%
11949%
12049%
12149%
12249%
12349%
12448%
12548%
12648%
12748%
12847%
12947%
13047%
13147%
13247%
13347%
13447%
13546%
13646%
13746%
13846%
13946%
14046%
14146%
14246%
14346%
14445%
14545%
14645%
14745%
14845%
14945%
15044%
15144%
15244%
15344%
15444%
15544%
15644%
15744%
15844%
15944%
16044%
16144%
16244%
16343%
16443%
16543%
16643%
16743%
16843%
16943%
17043%
17142%
17242%
17342%
17442%
17542%
17642%
17742%
17842%
17942%
18042%
18142%
18242%
18342%
18441%
18541%
18641%
18741%
18841%
18941%
19040%
19140%
19240%
19340%
19440%
19540%
19640%
19740%
19840%
19940%
20040%
20139%
20239%
20339%
20439%
20539%
20639%
20739%
20839%
20939%
21038%
21138%
21238%
21338%
21438%
21538%
21638%
21738%
21838%
21938%
22037%
22137%
22237%
22337%
22437%
22537%
22637%
22737%
22837%
22937%
23037%
23137%
23237%
23337%
23436%
23536%
23636%
23736%
23836%
23936%
24036%
24136%
24236%
24336%
24436%
24535%
24635%
24735%
24835%
24935%
25035%
25135%
25235%
25335%
25435%
25535%
25635%
25734%
25834%
25934%
26034%
26134%
26234%
26333%
26433%
26533%
26633%
Feuil1
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
9Not sure i understand what you want?
if the percentage in column A is between the criteria in column E, then i want the type in column D to be noted in column B.

example : 97% is between the criteria 81%-99% therefore in column B it should be typed : Between 81% and 99%

hope thats clear
 
Upvote 0
If you can split your range limits into seperate columns like below you can add the following formula to cell B2 and copy it all the way down.

Excel Formula:
=IF(A2<=$F$8,$D$8,IF(AND(A2>=$E$7,A2<=$F$7),$D$7,IF(AND(A2>=$E$6,A2<=$F$6),$D$6,IF(AND(A2>=$E$5,A2<=$F$5),$D$5,IF(A2=$F$4,$D$4,"")))))

Its not the most elegant of formulas and is likely a much simpler one to use but if you get no more replies this should work for you.

Rory

percentagetype
100.00%​
equal to 100%
100.00%​
equal to 100%typeLower LimitUpper Limit
99.00%​
Between 81% and 99%equal to 100%
100.00%​
97.00%​
Between 81% and 99%Between 81% and 99%
81.00%​
99.00%​
94.00%​
Between 81% and 99%Between 61% and 80%
61.00%​
80.00%​
91.00%​
Between 81% and 99%between 40% and 60%
40.00%​
60.00%​
90.00%​
Between 81% and 99%less than minimum
0.00%​
39.00%​
90.00%​
Between 81% and 99%
30.00%​
less than minimum
40.00%​
between 40% and 60%
20.00%​
less than minimum
less than minimum
less than minimum
 
Upvote 0
If you can split your range limits into seperate columns like below you can add the following formula to cell B2 and copy it all the way down.

Excel Formula:
=IF(A2<=$F$8,$D$8,IF(AND(A2>=$E$7,A2<=$F$7),$D$7,IF(AND(A2>=$E$6,A2<=$F$6),$D$6,IF(AND(A2>=$E$5,A2<=$F$5),$D$5,IF(A2=$F$4,$D$4,"")))))

Its not the most elegant of formulas and is likely a much simpler one to use but if you get no more replies this should work for you.

Rory

percentagetype
100.00%​
equal to 100%
100.00%​
equal to 100%typeLower LimitUpper Limit
99.00%​
Between 81% and 99%equal to 100%
100.00%​
97.00%​
Between 81% and 99%Between 81% and 99%
81.00%​
99.00%​
94.00%​
Between 81% and 99%Between 61% and 80%
61.00%​
80.00%​
91.00%​
Between 81% and 99%between 40% and 60%
40.00%​
60.00%​
90.00%​
Between 81% and 99%less than minimum
0.00%​
39.00%​
90.00%​
Between 81% and 99%
30.00%​
less than minimum
40.00%​
between 40% and 60%
20.00%​
less than minimum
less than minimum
less than minimum
thanks for the reply. however, i'm finding dificulties in applying it because of the differents rang. can you apply the formula in the sheet i have provided if it's possible.
thank you
 
Upvote 0
thanks for the reply. however, i'm finding dificulties in applying it because of the differents rang. can you apply the formula in the sheet i have provided if it's possible.
thank you
What is not working? Just copy and paste the formula into cell B2 and change your column E into seperate numbers in E and F.
 
Upvote 0

Forum statistics

Threads
1,215,334
Messages
6,124,323
Members
449,154
Latest member
pollardxlsm

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