How to count rows that contain specific value

By using MMULT function, we can count a specific record in the table.

For example, in the below table, How many people weigh is more than 230 kg?

NameAgeHeightWeigh
Olivia25210180
Noah25205235
Oliver27195205
Elijah22198185
James29199231
William29201240
Benjamin21202235
Lucas25200238
Henry22204190

The formula is :

=SUM(--(D2:D10>230))---->>>>>answer is 5
How to count rows that contain specific value

And, How many people weigh or Height is more than 200 kg?

=SUM(--(MMULT(--(B2:E10>200),TRANSPOSE(COLUMN(B2:E10)))>0))
answer is 8
How to count rows that contain specific value

MMULT Function

The MMULT function is one of the math functions of Excel.

It Returns the matrix product of two arrays, an array with the same number of rows as array1 and columns as array2.

MMULT arguments

This function has just 1 Argument.

The argument of MMULT function is number.

Array1 is the first array of numbers to multiply and must have the same number of columns as Array2 has rows.

Array2 is the second array of numbers to multiply and must have the same number of columns as Array1 has rows.

The argument of MMULT function is required and not optional.

MMULT(number) = number

Leave a Reply

Your email address will not be published. Required fields are marked *