Largest Letter

suechetty

New Member
Joined
Jul 4, 2020
Messages
9
Office Version
  1. 365
Platform
  1. Windows
Hello,
I would like a formula to say "OK" if Grade 1 is the highest grade compared to Grade 2 and Grade 3. What formula can I use please?
Also, is there a way I can use conditional formatting to highlight Grade 1 cell if it is the highest grade?

Thank you for the help.
Example
Grade 1Grade 2Grade 3
ABBOK
CBANO
 
Good catch! Here is a fix (the formula is still normally-entered)...

=IF(OR(LEN(G2)>1,AND(MAX(LEN(H2),LEN(I2))<=LEN(G2),CODE(G2)<=MIN(CODE(H2),CODE(I2)))),"OK","No")

And if the OP is willing to accept TRUE or FALSE answer, this (still normally-entered)...

=OR(LEN(G2)>1,AND(MAX(LEN(H2),LEN(I2))<=LEN(G2),CODE(G2)<=MIN(CODE(H2),CODE(I2))))

True/False is good too as I'm setting a number of conditions and this is just one of them. I've used Fluff's formula and it worked fine so far. As I'm working through the spreadsheet, I have another condition I would like to flag. I did not raise this earlier as it wasn't a condition I needed at the beginning but the analysis is getting bigger as I'm working through it. Here goes: I'm setting a rule to flag any scores that is ending with these scores:
34
39
49
59
69
79
with a further condition. I'll try to explain in this table below with the formulas. See Rule 1.

Overall ScoreSCORE 1SCORE 1 GRADE 1GRADE 2GRADE 3Condition 1 Highest GradeCondition 2 All 3 Grade MatchCondition 3 SCORE 1 Grade 1 & Grade 3 MatchRule 1
6259CA*BOKNONOIF Score1 Grade 1 is one grade below Grade 3, and Grade 1 Score is borderline (34,39,49,59,69,79), then "UPGRADE". If not "REMAIN".
So this cell should state UPGRADE as it met the rule.
CB4*1.0366-5.3034TRIM(LOOKUP(CD4,$CV$6:$CW$13))TRIM(AT4)TRIM(L4)IF(LEN(CE4)=1,IF(AND(CODE(CE4)=MIN(CODE(CE4:CG4)),SUM(--ISNUMBER(FIND("*",CF4:CG4)))=0),"OK","No"),"OK")IF(AND(TRIM(CE4)=TRIM(CF4),TRIM(CE4)=TRIM(CG4)),"MATCH","NO")IF(TRIM(CE4)=TRIM(CG4),"MATCH","NO")

The columns AT4 and L4 are a list of grades from other cells. All the grades are converted from scores through a lookup table.

Total MarksGrade
0U
35E
40D
50C
60B
70A
80A*
WDWD

I hope I've provided as much information as possible here. Thank you so much in advance.
 
Upvote 0

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
How about
+Fluff New.xlsm
OPQRSTUVW
26259CA*BOKNONOUpgrade
Main
Cell Formulas
RangeFormula
W2W2=IF(AND(CODE(Q2)=CODE(S2)+1,OR(P2={34,39,49,59,69,79})),"Upgrade","")
 
Upvote 0
How about
+Fluff New.xlsm
OPQRSTUVW
26259CA*BOKNONOUpgrade
Main
Cell Formulas
RangeFormula
W2W2=IF(AND(CODE(Q2)=CODE(S2)+1,OR(P2={34,39,49,59,69,79})),"Upgrade","")
:biggrin:That worked but I got a problem with A* again so the +1 don't recognize A* as the higher grade. All the other letters worked.
 
Upvote 0
Ok, how about
=IF(AND(OR(CODE(Q2)=CODE(S2)+1,AND(LEN(S2)=2,Q2="A")),OR(P2={34,39,49,59,69,79})),"Upgrade","")
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,048
Messages
6,122,862
Members
449,097
Latest member
dbomb1414

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