Forum Discussion
Rebekah110
Mar 28, 2023Copper Contributor
Help with COUNTIFS
Hello! I have a table with a list of transactions by date. I would like to count the number of times a phrase appears in a particular year. How many times did we list "General Operating Support" in 2...
Rebekah110
Mar 28, 2023Copper Contributor
So it looks like there might just be something wrong with the way I have my date fields formatted. When I use mathetes idea of pulling out the Year into a separate column, my COUNTIFS idea worked fine. Now I also need to display the number of records that are NOT General Operating Support. I thought I could do
=countifs(A:A,E2,B:B,<>"General Operating Support")
but Excel doesn't like that.
=countifs(A:A,E2,B:B,<>"General Operating Support")
but Excel doesn't like that.
mathetes
Mar 28, 2023Gold Contributor
No, but, again if you have a current version of Excel, this formula, with FILTER at the heart of it, does work.
=COUNT(FILTER(A2:B34,(YEAR(A2:A34)=E2)*(B2:B34<>"General Operating Support")))
Here's a reference to help you understand FILTER, a very useful function in many circumstances.