Total of marks with the specific conditions

nskatoch

Board Regular
Joined
Dec 30, 2013
Messages
63
Office Version
  1. 365
Platform
  1. Windows
R.No.NAME OF STUDENTENGLISHHINDIPUNJABIMATHS.SCIENCES.SCI.GERMANSKILLTotal
Maximum Marks: -100100100100100100100100
1ARYAN4556663278444342
2BALLU5045654512554240
3CRAYAN676763664534144
4DOLLY3378647767788081
5ELISHA7879618864635590
6FLOWER4692629845446088
7GAUTAM9050608750894857
8HAPPY55676576765660
68​

In the above table, I want the formula for TOTAL, which fulfill the following conditions: -
  • The pass criteria is 33 marks.
  • If the marks of Maths or Science or S. Sci. Less than 33 and the marks of Skill is more than 33, then marks of Maths/Science/S.Sci replaced by skill subject. (e.g. Maths-23, Science-45, SSci-56 and Skill-78 then Skill replaced the Maths.)
  • If the marks of Hindi or Punjabi less than 33 and German has more then 33 marks then marks of Punjabi/Hindi replaced by German. (e.g. Hindi-32, Punjabi-80, German-47 then German replaced the Hindi)
 

Attachments

  • Table.png
    Table.png
    47.7 KB · Views: 19

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
What if multiple subjects are below 33? Do all of them get replaced or just one of them?
e.g. Maths-23, Science-23, SSci-23 and Skill-78
 
Upvote 0
And with Cubist's question, do you count the German and Skill categories if all the other categories are over 33? Should the result of row 5 be 6 or 8?
 
Upvote 0
And with Cubist's question, do you count the German and Skill categories if all the other categories are over 33? Should the result of row 5 be 6 or 8?
No, only main subjects count (i.e. English, Hindi, Punjabi, Maths, Science, S.Sci).
 
Upvote 0
One way (I changed some values in the last row for testing):

Book1
ABCDEFGHIJK
1
2R.No.NAME OF STUDENTENGLISHHINDIPUNJABIMATHS.SCIENCES.SCI.GERMANSKILLTotal
3Maximum Marks: -100100100100100100100100100
41ARYAN45566632784443426
52BALLU50456545125542406
63CRAYAN6767636645341446
74DOLLY33786477677880816
85ELISHA78796188646355906
96FLOWER46926298454460886
107GAUTAM90506087508948576
118HAPPY55671725255660114
Sheet8
Cell Formulas
RangeFormula
K4:K11K4=(C4>=33)+MIN((D4>=33)+(E4>=33)+(I4>=33),2)+MIN((F4>=33)+(G4>=33)+(H4>=33)+(J4>=33),3)
 
Upvote 0
One way (I changed some values in the last row for testing):

Book1
ABCDEFGHIJK
1
2R.No.NAME OF STUDENTENGLISHHINDIPUNJABIMATHS.SCIENCES.SCI.GERMANSKILLTotal
3Maximum Marks: -100100100100100100100100100
41ARYAN45566632784443426
52BALLU50456545125542406
63CRAYAN6767636645341446
74DOLLY33786477677880816
85ELISHA78796188646355906
96FLOWER46926298454460886
107GAUTAM90506087508948576
118HAPPY55671725255660114
Sheet8
Cell Formulas
RangeFormula
K4:K11K4=(C4>=33)+MIN((D4>=33)+(E4>=33)+(I4>=33),2)+MIN((F4>=33)+(G4>=33)+(H4>=33)+(J4>=33),3)
One way (I changed some values in the last row for testing):

Book1
ABCDEFGHIJK
1
2R.No.NAME OF STUDENTENGLISHHINDIPUNJABIMATHS.SCIENCES.SCI.GERMANSKILLTotal
3Maximum Marks: -100100100100100100100100100
41ARYAN45566632784443426
52BALLU50456545125542406
63CRAYAN6767636645341446
74DOLLY33786477677880816
85ELISHA78796188646355906
96FLOWER46926298454460886
107GAUTAM90506087508948576
118HAPPY55671725255660114
Sheet8
Cell Formulas
RangeFormula
K4:K11K4=(C4>=33)+MIN((D4>=33)+(E4>=33)+(I4>=33),2)+MIN((F4>=33)+(G4>=33)+(H4>=33)+(J4>=33),3)
=SUM(C4:J4)-IFERROR(INDEX(C4:J4,MATCH(1,--(C4:J4<33),0)),MIN(F4:J4))
With the above formula I fulfil the first and second condition but not third condition. Please suggest
 
Upvote 0
=SUM(C4:J4)-IFERROR(INDEX(C4:J4,MATCH(1,--(C4:J4<33),0)),MIN(F4:J4))
With the above formula I fulfil the first and second condition but not third condition. Please suggest
I don't have a better suggestion but your formula replaces the first instance less than 33. I would think you want to replace the lowest score.
e.g. 60 23 12. It replaces the 23 when it should replace the 12.
 
Upvote 0
I don't have a better suggestion but your formula replaces the first instance less than 33. I would think you want to replace the lowest score.
e.g. 60 23 12. It replaces the 23 when it should replace the 12.
How can I achieve the following condition:
  • If the marks of Hindi or Punjabi less than 33 and German has more then 33 marks then marks of Punjabi/Hindi replaced by German. (e.g. Hindi-32, Punjabi-80, German-47 then German replaced the Hindi)
 
Upvote 0
I seem to have misunderstood your query. Try:

Book1
ABCDEFGHIJK
1
2R.No.NAME OF STUDENTENGLISHHINDIPUNJABIMATHS.SCIENCES.SCI.GERMANSKILLTotal
3Maximum Marks: -100100100100100100100100100
41ARYAN4556663278444342331
52BALLU5045654512554240300
63CRAYAN676763664534144352
74DOLLY3378647767788081397
85ELISHA7879618864635590433
96FLOWER4692629845446088387
107GAUTAM9050608750894857426
118HAPPY5567172525566011288
Sheet8
Cell Formulas
RangeFormula
K4:K11K4=SUM(C4:H4)+IF(AND(MIN(D4:E4)<33,I4>=33),I4-MIN(D4:E4))+IF(AND(MIN(F4:H4)<33,J4>=33),J4-MIN(F4:H4))
 
Upvote 0
Solution

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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