How do I count a text from filtered column please?

atiq124

New Member
Joined
May 9, 2014
Messages
27
I am using countif(range,"TEXT") to get the total of my TEXT.
Now, I have to filter them by year (2023 or 2024) and countif does not work for filtered column as it still gives me total numbers regardless of the applied filter.
How do I count the number of my text in the filtered column please.

In the attached file, I am looking to count In Progress projects in column B when Column C is filtered for year 2024.
 

Attachments

  • countif subtotal.jpg
    countif subtotal.jpg
    242.9 KB · Views: 11

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Hi, you can try:

=COUNTIFS(B3:B40,"In Progress",C3:C40,2024)

or

=SUMPRODUCT(--(B3:B40="In Progress")*(C3:C40=2024))
 
Upvote 1
SUMPRODUCT(--(B3:B40="In Progress")*(C3:C40=2024))
Brilliant, both formulas worked, thank you so much for your help. One more question here, if I have 2021 and 2022 years as well in column C; and I want to get the total for only 2023 and 2024 (excluding 2021 and 2022), how do I do that please?
 
Upvote 0
To do a countif for Status "in Progress" and years = (2023 and 2024} you do the following (adjust the range accordingly)

=SUM(COUNTIFS(B3:B40,"In Progress",C3:C40,{2023,2024}))

or

=SUMPRODUCT(--(B3:B40="In Progress")*(C3:C40={2024,2023}))
 
Upvote 1
Solution
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
To do a countif for Status "in Progress" and years = (2023 and 2024} you do the following (adjust the range accordingly)

=SUM(COUNTIFS(B3:B40,"In Progress",C3:C40,{2023,2024}))

or

=SUMPRODUCT(--(B3:B40="In Progress")*(C3:C40={2024,2023}))
Super, thank you so much for your help
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
I am using Microsoft 365 E3.
 
Upvote 0
Another interesting questions for same topic. can we use filters option with dropdown menue on the top of the page to select which years data we want to select, so if we select 2023 and 2024 from there, rest of the data will not appear (2021, 2022)....?
 
Upvote 0
As you have 365 another option is
Excel Formula:
=COUNT(FILTER(ROW(B3:B100),(B3:B100="in progress")*(BYROW(B3:B100,LAMBDA(br,SUBTOTAL(103,br)))=1)))
This will only count visible rows with In Progress
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,956
Members
449,096
Latest member
Anshu121

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