Count multiple instances within multiple row

qwzky

Board Regular
Joined
Jul 22, 2021
Messages
53
Office Version
  1. 2021
  2. 2016
Platform
  1. Windows
Hi! I am having some trouble with counting a certain value ("<5") within multiple rows as one, no matter how many times that value repeats itself:

SC-uri automate REDONE4 (test, ă văd dacă merge să lucrez in sheets separate).xlsm
BCDEFGHI
3StudentsGrade 1Grade 2Grade 3Grade 4Grade 5GRADE 6COUNT
4
5Mark447755count as 1, even if there are two "4"s (aka <=5)
6John666766don't count
7Anneabs56544don't count, because there is at least 1 "abs"
8James1010101095don't count
9the final result should be 2 (2 students failed)
CIORNĂ


The formula I tried is
Excel Formula:
=COUNTIF(C5:H8;"<5")
, but it returns 4 students failed. Please, help me make with this.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
How about
Excel Formula:
=IF(COUNTIF(C5:H5,"<5")>0,1,"")
drag down as required
 
Upvote 0
Hi, Michael! Now, it counts that only 1 students has failed. I need a formula that returns a single result that sums up every row somehow, but without creating a column withe separate results. Something like this:

SC-uri automate REDONE4 (test, ă văd dacă merge să lucrez in sheets separate).xlsm
BCDEFGHI
3StudentsGrade 1Grade 2Grade 3Grade 4Grade 5GRADE 6FAILED
4
5Mark4477551
6John666766
7Anneabs56544
8James1010101095
CIORNĂ
Cell Formulas
RangeFormula
I5I5=IF(COUNTIF(C5:H8,"<5")>0,1,"")
 
Upvote 0
Book1
ABCDEFGHI
33StudentsGrade 1Grade 2Grade 3Grade 4Grade 5GRADE 6FAILED
44
55Mark4477551
66John666766 
77Anneabs565441
88James1010101095 
Sheet1
Cell Formulas
RangeFormula
I5:I8I5=IF(COUNTIF(C5:H5,"<5")>0,1,"")
 
Upvote 0
Michael, thank you for your fast reply :) I need a formula which should include the results in only one result. Something like this:
Excel Formula:
=IF(COUNTIF(C7:H7,"<5")>0,1,"")
But it doesn't work. Is it possible my request to be impossible to do in Excel?
 
Upvote 0
Sorry, I meant:
Excel Formula:
=SUM(IF(COUNTIF(C5:H5;"<5")>0;1;"");(IF(COUNTIF(C6:H6;"<5")>0;1;"");IF(COUNTIF(C7:H7;"<5")>0;1;"";IF(COUNTIF(C8:H8;"<5")>0;1;""))))
 
Upvote 0
I am tired of this and this is why I always forget to double check my replies... I modified the last formula into
Excel Formula:
=IF(COUNTIF(C5:H5;"<5")>0;1;""+IF(COUNTIF(C6:H6;"<5")>0;1;""+IF(COUNTIF(C7:H7;"<5")>0;1;""+IF(COUNTIF(C8:H8;"<5")>0;1;""))))

It returns "1", instead of "2". Do you have a workaround? Also, if possible, a shorter formula, because I have 90 rows to count and it would take me some time to select all ranges.
 
Upvote 0
I will restart this thread because I made too many errors of judgement (hate my low-level brain)
 
Upvote 0
To be honest I would stick with my method and then put a sum at the bottom of column "I"
 
Upvote 0

Forum statistics

Threads
1,215,407
Messages
6,124,723
Members
449,184
Latest member
COrmerod

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