Using Subtotal with countifs

rishilaughs

New Member
Joined
Jun 10, 2013
Messages
6
[TABLE="width: 500"]
<tbody>[TR]
[TD]Content[/TD]
[TD]Category[/TD]
[/TR]
[TR]
[TD]Random Content 1[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]Random Content 2[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]Random Content 3[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]Random Content 4[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]Random Content 6[/TD]
[TD]B[/TD]
[/TR]
</tbody>[/TABLE]

Dear,

I know this type of question has been addressed before but I was having problem understanding the multiple formulae used and how it could be applied to my specific problem.

What i am trying to do is, use Subtotal function in conjunction with Countif

For the given problem, please guide how to count(CountA) category (either A, B,C) in a filtered row using formulae.

I am using http://www.mrexcel.com/forum/excel-questions/698211-combine-countif-subtotal.html this as reference but having problem understanding so many nested formulae.

Thanks
 
Thanks Aladin for the help!
It showed me formula parse error.
I will try to understand what all these nested function convey and where could be possible error
But for the moment Jonmo1 reply saved me for the moment!

Best Regards,

The equality test...

=SUMPRODUCT(SUBTOTAL(3,OFFSET(C10,ROW(C10:C1000)-ROW(C10),0,1)),(I10:I1000="A")+0)
 
Upvote 0

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
I want to combine to formulas:


The first:
=COUNTIF(G8:G110,"2")+COUNTIF(G8:G110,"1")


The second:
=SUBTOTAL(9,G8:G110)


Is it possible?


Thanks for any help!
 
Upvote 0
I want to combine to formulas:


The first:
=COUNTIF(G8:G110,"2")+COUNTIF(G8:G110,"1")


The second:
=SUBTOTAL(9,G8:G110)


Is it possible?


Thanks for any help!

If it must be a sum...

=SUMPRODUCT(SUBTOTAL(9,OFFSET(G8,ROW(G8:G110)-ROW(G8),0,1),--ISNUMBER(MATCH(G8:G10,{1,2},0)))

If it must be a count...

=SUMPRODUCT(SUBTOTAL(2,OFFSET(G8,ROW(G8:G110)-ROW(G8),0,1),--ISNUMBER(MATCH(G8:G10,{1,2},0)))
 
Upvote 0
edited:

If it must be a sum...

=SUMPRODUCT(SUBTOTAL(9,OFFSET(G8,ROW(G8:G110)-ROW(G8),0,1)),--ISNUMBER(MATCH(G8:G10,{1,2},0)))

If it must be a count...

=SUMPRODUCT(SUBTOTAL(2,OFFSET(G8,ROW(G8:G110)-ROW(G8),0,1)),--ISNUMBER(MATCH(G8:G10,{1,2},0)))[/QUOTE]
 
Upvote 0
May you please helpme with another simmiliar formula that combine this two formulas:

The first:

=COUNTIF(N8:N119,"1")

The second:
=SUBTOTAL(9,N8:N119)

Thanks a lot in advance,
Yaniv.
 
Upvote 0
May you please helpme with another simmiliar formula that combine this two formulas:

The first:

=COUNTIF(N8:N119,"1")

The second:
=SUBTOTAL(9,N8:N119)

Thanks a lot in advance,
Yaniv.

Looks like:

=SUMPRODUCT(SUBTOTAL(2,OFFSET(N8,ROW(N8:N119)-ROW(N8),0,1)),--(N8:N119=1))

 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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