Countif formula

BASANTH BABU

New Member
Joined
Aug 4, 2017
Messages
3
I am having a student data to calculate the number of subjects failed by a student. ABSENT is also considered as fail and those who have scored below 50 marks is considered as Fail. The excel sheet designed is as follows:

Roll No Name Subject 1 Subject 2 Subject 3 Subject 4 Subject 5 No. of subjects failed
1001 S-1 59 65 75 80 92 0
1002 S-2 45 ABSENT 60 75 25 3
1003 S-3 75 20 35 60 30 3

and so on..

I need a formula to calculate the number of subjects failed by each student in the last column. Can any one help me how to write the formula?
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hi

You can try like this...


Book1
ABCDEFGH
1Roll NoNameSubject 1Subject 2Subject 3Subject 4Subject 5Failed
21001S-159657580920
31002S-245ABSENT6075253
41003S-375203560303
Sheet5
Cell Formulas
RangeFormula
H2=SUMPRODUCT(COUNTIF(C2:G2, {"ABSENT","<50"}))
 
Last edited:
Upvote 0
Hi

You can try like this...

ABCDEFGH
Roll NoNameSubject 1Subject 2Subject 3Subject 4Subject 5Failed
S-1
S-2ABSENT
S-3

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]1001[/TD]

[TD="align: right"]59[/TD]
[TD="align: right"]65[/TD]
[TD="align: right"]75[/TD]
[TD="align: right"]80[/TD]
[TD="align: right"]92[/TD]
[TD="align: right"]0[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]1002[/TD]

[TD="align: right"]45[/TD]

[TD="align: right"]60[/TD]
[TD="align: right"]75[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]3[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]1003[/TD]

[TD="align: right"]75[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]35[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]3[/TD]

</tbody>
Sheet5

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]H2[/TH]
[TD="align: left"]=SUMPRODUCT(COUNTIF(C2:G2, {"ABSENT","<50"}))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
It works. Thanks a lot.
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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