Formula help (lowest figures with mandatory inclusions)

ExcellingAtLife

New Member
Joined
Jun 26, 2024
Messages
1
Office Version
  1. Prefer Not To Say
Platform
  1. Windows
Hi guys,

One of our admin is currently calculating exam marks manually, and with over 200 to calculate I've offered to help. However, I've hit a blank...

We host an exam series with two types of exam and the student final scores are their highest three scores BUT one score must come from exam type A and one score from exam type B (I didn't realise this and just started using the LARGE function to SUM the three highest scores across all 6 exams which was incorrect).

I'm stumped, I started trying using LARGE and just selecting the cells with exam scores for type A to find the highest score for type A, then repeating for B, but then I can't get my head around the next step because technically all three highest scores could some from one exam type, and plus some students have only attended exam type A, missing type B (or vice versa), so shouldn't have an overall score as they've failed by default... Help!

Below is an idea of what the spreadsheet looks like (obvs anonymised) to give you an idea of what it looks like :)

1719418610396.png
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
My solution uses helper columns, but they could be combined into long formulas instead.

Book1
ABCDEFGHIJKLMNOPQR
1Exam A1Exam A2Exam B1Exam A3Exam B2Exam B3TotalAutoFail1st A2nd A3rd A1st B2nd B3rd Bsum 1st A, 1st B and highest of 2nd&3rd A and 2nd&3rd B
2Adam484440453539 484544404039133
3Keith494537482933 494845373733134
4David414337393640 434139403937124
5James272511Fail272511#NUM!#NUM!#NUM!Fail
Sheet1
Cell Formulas
RangeFormula
J2:J5J2=IF(OR(ISERROR(K2),ISERROR(N2)),"Fail","")
K2:K5K2=LARGE((B2:C2,E2),1)
L2:L5L2=LARGE($B2:$E2,2)
M2:M5M2=LARGE($B2:$E2,3)
N2:N5N2=LARGE((F2:G2,D2),1)
O2:O5O2=LARGE($D2:$G2,2)
P2:P5P2=LARGE($D2:$G2,3)
R2:R5R2=IF(J2="Fail","Fail",SUM(K2,N2,MAX(L2:M2,O2:P2)))
 
Upvote 0
Edited: I forgot to stagger the $ for some cells.
Book1
ABCDEFGHIJKLMNOPQR
1Exam A1Exam A2Exam B1Exam A3Exam B2Exam B3TotalAutoFail1st A2nd A3rd A1st B2nd B3rd Bsum 1st A, 1st B and highest of 2nd&3rd A and 2nd&3rd B
2Adam484440453539 454844403935133
3Keith494537482933 484945373329134
4David414337393640 414339403736124
5James272511Fail252711#NUM!#NUM!#NUM!Fail
Sheet1
Cell Formulas
RangeFormula
J2:J5J2=IF(OR(ISERROR(K2),ISERROR(N2)),"Fail","")
K2:K5K2=LARGE(($B2:$C2,$E2),2)
L2:L5L2=LARGE(($B2:$C2,$E2),1)
M2:M5M2=LARGE(($B2:$C2,$E2),3)
N2:N5N2=LARGE(($F2:$G2,$D2),1)
O2:O5O2=LARGE(($F2:$G2,$D2),2)
P2:P5P2=LARGE(($F2:$G2,$D2),3)
R2:R5R2=IF(J2="Fail","Fail",SUM(K2,N2,MAX(L2:M2,O2:P2)))
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Here another solution:

ExamResult.xlsx
ABCDEFGHIJ
1Exam A1Exam A2Exam B1Exam A3Exam B2Exam B3FormulaExpected result
2Adam484440453539133133
3Keith494537482933134134
4David414337393640124124
5James272511Fail
Hoja1
Cell Formulas
RangeFormula
H2:H5H2=IFERROR(LARGE((B2:C2,E2),1)+LARGE((D2,F2:G2),1)+MAX(IFERROR(LARGE((B2:C2,E2),2),0),IFERROR(LARGE((D2,F2:G2),2),0)),"Fail")
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,399
Latest member
alchavar

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