How to Calculate the Number of Sundays Between Dates in Excel

Learn the Excel formula to count Sundays between two dates using SUMPRODUCT and WEEKDAY functions for accurate results.

30 views

To calculate the number of Sundays in Excel, you can use a formula combining `SUMPRODUCT` and `WEEKDAY` functions. For a date range in cells A1 (start date) and B1 (end date), use: `=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&B1)))=1))`. This formula counts all Sundays between the two dates. Make sure your dates are in the correct format for the formula to work effectively.

FAQs & Answers

  1. What formula counts Sundays between two dates in Excel? Use =SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&B1)))=1)) where A1 is the start date and B1 is the end date to count all Sundays in that range.
  2. Can I modify the formula to count other weekdays in Excel? Yes, change the number in the WEEKDAY function to match the weekday you want to count: for example, 2 for Monday, 3 for Tuesday, and so on.
  3. How does the WEEKDAY function work in Excel? The WEEKDAY function returns a number representing the day of the week for a given date, where 1 typically corresponds to Sunday, 2 to Monday, etc.