If Condition with Conditional Formating

Navi_G

Board Regular
Joined
May 30, 2018
Messages
94
Office Version
  1. 2016
Platform
  1. Windows
Dear Experts,

I need a if formula that solve my problem with conditional Formatting.
Like, School scores grading on below Illustration</SPAN>:
i) less then 33% Grade Result F and showing in red
ii) 34% to 40% Grade Result E and showing in yellow
iii) 40% to 50% Grade Result D and showing in Green
iii) 50% to 60% Grade Result C and showing in Blue
iv) 60% to 70% Grade Result B and showing in Orange
v) 70% to 80 % Grade Result A and showing in Orange
vi) 80% to 100 % Grade Result A+ and showing in orange.

I need a formula for result (A+, A, B, C, D, E, F) and (color of condition formatting).

Regards
Navi_G:eek:
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
You would create a CF rule for each color.
Assuming the percent is in A2.

for red
Code:
=A2<=33%

for Yellow
Code:
=AND(A2>=34%,A2<=39%)

Green
Code:
=AND(A2>=40%,A2<=49%)

Blue
Code:
=AND(A2>=50%,A2<=59%)

Orange
Code:
=AND(A2>=60%,A2<=100%)

To get the letter grade
Code:
=IF(A2<=33%,"F",IF(AND(A2>=34%,A2<=39%),"E",IF(AND(A2>=40%,A2<=49%),"D",IF(AND(A2>=50%,A2<=59%),"C",IF(AND(A2>=60%,A2<=69%),"B",IF(AND(A2>=70%,A2<=79%),"A","A+"))))))
 
Last edited:
Upvote 0
Thanks for your expert opinion.

i) if fomula is problem solved.
ii) But we need C.Formatting on Grade Column (A+, A, B, C, D, E, F) with using percentage column.

Thanks for your reply.
 
Upvote 0
Please help me on conditional formatting for Grades......
 
Upvote 0
Hi,

You'll need 5 separate CF rules, one for each color.

Select the range in Column F, and add CF rules using formula, use my formulas in H2:L2, one at a time.


Book1
BCDEFGHIJKL
1StudentsObtained ScoreTotal ScorePercentage %GradeOrangeBlueGreenYellowRed
2Student_1850120070.83%ATRUEFALSEFALSEFALSEFALSE
3Student_2950120079.17%A
4Student_31140120095.00%A+
5Student_4330120027.50%F
6Student_5451120037.58%E
7Student_6669120055.75%C
8Student_7776120064.67%B
9Student_8267120022.25%F
10Student_9981120081.75%A+
11Student_10532120044.33%D
12Student_11572120047.67%D
13Student_12981120081.75%A+
14Student_13401120033.42%E
15Student_14235120019.58%F
Sheet77
Cell Formulas
RangeFormula
H2=OR(F2="A+",F2="A",F2="B")
I2=F2="C"
J2=F2="D"
K2=F2="E"
L2=F2="F"
 
Upvote 0
Hi,

You'll need 5 separate CF rules, one for each color.

Select the range in Column F, and add CF rules using formula, use my formulas in H2:L2, one at a time.

BCDEFGHIJKL
1StudentsObtained ScoreTotal ScorePercentage %GradeOrangeBlueGreenYellowRed
2Student_1850120070.83%ATRUEFALSEFALSEFALSEFALSE
3Student_2950120079.17%A
4Student_31140120095.00%A+
5Student_4330120027.50%F
6Student_5451120037.58%E
7Student_6669120055.75%C
8Student_7776120064.67%B
9Student_8267120022.25%F
10Student_9981120081.75%A+
11Student_10532120044.33%D
12Student_11572120047.67%D
13Student_12981120081.75%A+
14Student_13401120033.42%E
15Student_14235120019.58%F

<COLGROUP><COL><COL><COL><COL><COL><COL><COL><COL><COL><COL><COL><COL></COLGROUP><THEAD>
</THEAD><TBODY>
</TBODY>
Sheet77

Worksheet Formulas
CellFormula
H2=OR(F2="A+",F2="A",F2="B")
I2=F2="C"
J2=F2="D"
K2=F2="E"
L2=F2="F"

<THEAD>
</THEAD><TBODY>
</TBODY>

<TBODY>
</TBODY>

Hi,

Thanks for your response i work your expert opinion but only Orange color cover all cells and
but other colors not working please check and confirm what problem in this illustration.

My steps please review where is problem?

i) I enter formulas in range (H2:L2) and headings as well as (Orange,Blue,Green,Yellow,Red) in range (H1:L1).
ii) I select F2 and go to C.Formatting and use formula and select H2 and Format Orange.
iii) Next i select F2 and Repeat previous with range I2 and Color Blue and other as well as.
iv) but Orange color is working on all Grades others.

Please Review the Steps thanks for guidence

Thanks & Regards
Navi_G:confused:
 
Upvote 0
No, you don't need to add H2:L2 nor H1:L1, I have it in my sample Only to illustrate the logic and also to show the formulas.

Select F2 (or select ENTIRE data range in F Column), then go to Conditional Formatting, choose "Use formula....", enter the formula for Orange, click Format, choose your color (Orange), click OK, OK.
Repeat, Select F2, go to CF, use formula..., enter the formula for Blue, click Format, choose Blue, OK, OK.
Repeat for Green, Yellow, Red...

Let me know if you got it to work.
 
Upvote 0
Cross posted https://www.excelforum.com/excel-ge...a-with-conditional-formating.html#post4912289

Cross-Posting
While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0
Cross posted https://www.excelforum.com/excel-ge...a-with-conditional-formating.html#post4912289

Cross-Posting
While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.

Thanks For guidence.
Next time i avoide...

Navi_G
 
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

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