Forum Discussion
Counting within a date range across multiple sheets?
Hi Excel community, I am working on creating a section within my grant tracking that shows us application rate per year. Until now we have mostly cared about our disbursements, but a new board wants to also examine the success of advertising our grants to the community. I have written this formula that pulls the count from the main page: =COUNTIFS('Disbursements'!K:K,">=01/01/2023",'Disbursements'!K:K,"<=12/31/2023"). This count is accurate, and for the year 2024 reads 144.
I also have a sub-tracker, that tracks these same grants given to individuals living within a specific area. When I add the same criteria to the formula and it then reads: =COUNTIFS('Disbursements'!K:K,">=01/01/2023",'Disbursements'!K:K,"<=12/31/2023",'CityA'!G:G,">=01/01/2023",'CityA'!G:G,"<=12/31/2023") the answer is no longer correct. It gives me the answer 2, when it should be 170 when I select by hand.
Has anyone else run into this issue before? I know my formulas could also be a little more elegant, I'm fairly new to Excel, so if anyone has any advice there I'd really appreciate it!
1 Reply
- m_tarlerBronze Contributor
Hard to know what you are doing for sure but if you want to COUNT 'Disbursements' and ADD COUNT 'CityA' then you need to have them separate. As it is it will only COUNT if the row on sheet Disbursements is in the year 2023 AND the CORRESPONDING row on sheet 'CityA' is in the year 2023. Maybe you want this instead:
=COUNTIFS('Disbursements'!K:K,">=01/01/2023",'Disbursements'!K:K,"<=12/31/2023") + COUNTIFS('CityA'!G:G,">=01/01/2023",'CityA'!G:G,"<=12/31/2023")