Home » excel » excel – Comparing Month with date(MM/DD/YR)

excel – Comparing Month with date(MM/DD/YR)

Posted by: admin May 14, 2020 Leave a comment


Is it possible to compare a month number with a date(MM/DD/YR) in Excel/Google Sheets?

For example, according to the screenshot, I just want to calculate the weekly time only in September and not August. I want it to be general so whatever month I choose, it will only calculate the hours for that month and not other months that is displayed on the table. I think the way to approach the problem is writing an if statement where if the DATE column starts with “9”, then it will only calculate that row, and ignore the other rows that is not a 9.

I am just not sure if we can compare multiple cells to see if it matches with a certain month.

enter image description here

How to&Answers:

all you need is:




You could use SUMIFS in both Excel or Google Sheets:


enter image description here

Adjust ranges (and make them absolute if need be)