Share via

Count data in month range

Anonymous
2022-01-25T01:52:35+00:00

Hi all I'm looking to have a formula that counts cells that say "BB" when within the same row is within the month of January of that given year 1/1/2021 to 1/31/2021.

I was just using the month function but when the year advances my formulas are then skewed as it counts any January cell not just for each year

My current formula

=SUMPRODUCT((MONTH(C2:C434)=1)*(A2:A434="BB"))

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. Anonymous
    2022-01-25T05:03:54+00:00

    The formula that worked for me was

    =COUNTIFS(C2:C434,">=1/1/2021",C2:C434,"<=1/31/2021",A2:A434,"BB")

    Wonderful!

    (It is not working for Me though.)

    Another alternative could be: =COUNTIFS(C2:C434,">=1/1/2021",A2:A434,"BB")-COUNTIFS(C2:C434,">31/1/2021",A2:A434,"BB")

    Please respond if You require further assistance. I will try My best to be of help.

    If I was able to help You, please mark My responses as answer and helpful.

    Thank You!

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2022-01-25T04:45:45+00:00

    The formula that worked for me was

    =COUNTIFS(C2:C434,">=1/1/2021",C2:C434,"<=1/31/2021",A2:A434,"BB")

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2022-01-25T04:39:17+00:00

    Hi,

    If You want the count for a specific year (2021), You are required to include this criteria as well in the formula.

    Like You have done for the month.

    Please try: =SUMPRODUCT(--(YEAR(C2:C434)=2021)*--(MONTH(C2:C434)=1)*--(A2:A434="BB"))

    Please respond if You require further assistance. I will try My best to be of help.

    If I was able to help You, please mark My response as answer and helpful.

    Thank You!

    Was this answer helpful?

    0 comments No comments
  4. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more