Formula for calculating

John 4348

Board Regular
Joined
Apr 21, 2022
Messages
81
Office Version
  1. 2010
Platform
  1. Mobile
I want to calculate students'scores in excel form. Who can help me?
Formula is: (A2+2*B2+C2+4*D2)/8
Scores are from 0 to 20,but for absent students score is 97 but not calculated for them.
If A2=97 is or B2=97 or C2=97or D2, how I can formulate so that 97 is not calculated?
 
Last edited by a moderator:
Maybe
Excel Formula:
=(A2*(A2<>97)+(2*B2)*(B2<>97)+C2*(C2<>97)+(4*D2)*(D2<>97))/(8-COUNTIFS(A2:D2,97)-(B2=97)-(3*(D2=97)))
If this does not give the correct answers, then you will need to explain exactly what the criteria are.
 
Upvote 0
Solution

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Maybe
Excel Formula:
=(A2*(A2<>97)+(2*B2)*(B2<>97)+C2*(C2<>97)+(4*D2)*(D2<>97))/(8-COUNTIFS(A2:D2,97)-(B2=97)-(3*(D2=97)))
If this does not give the correct answers, then you will need to explain exactly what the criteria are.
The criteria is 97 not calculated in the row. Supposing 97 is in the coulmn A2, the formula is( 2*B2+C2+4*D2)/7. If 97 is in the coulmn B2, the formula is ( A2+C2+4*D2)/6 and so on.
 
Upvote 0
Did the formula work?
Yes. Thanks a lot.
Maybe
Excel Formula:
=(A2*(A2<>97)+(2*B2)*(B2<>97)+C2*(C2<>97)+(4*D2)*(D2<>97))/(8-COUNTIFS(A2:D2,97)-(B2=97)-(3*(D2=97)))
If this does not give the correct answers, then you will need to explain exactly what the criteria are.
Hi
I apologize you.
If I want to use this formula for another sheet that has only 3 columns ( A2+2*B2+C2)/4 with the criteria number 97 which is not calculated. Could you please help me?
Thanks a lot
 
Upvote 0
How about
Excel Formula:
=(A2*(A2<>97)+(2*B2)*(B2<>97)+C2*(C2<>97))/(4-COUNTIFS(A2:C2,97)-(B2=97))
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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