This time you need to work out the number of Sundays on last date of the months between two given dates. For example, between two dates of 1-Jan-2017 to 31-Dec-2020, total number of Sundays on last date of the months is 6 as highlighted below.
The answer to the solution will be published after a month i.e. on 10-Oct-17.
For a single, dynamic formula solution:
Put the Start Date in cell B1 (01/01/2017)
Put the End Date in cell B2 (12/31/2020)
Use this formula in cell B3: =SUMPRODUCT(–(WEEKDAY(EOMONTH(DATE(YEAR(B1),ROW(INDIRECT(MONTH(B1)&":"&MONTH(B1)+DATEDIF(B1,B2,"m"))),1),0))=1))