# Sales from days of this month vs same quantity of days same month last year.

#### Daniboy

##### New Member
Hello, first of all thanks for your help.

What I want to do is to compare the cumulative sales from working days since first of the month to current date vs the sales of the same quantity of working days same month last year.

Lets say today is September 4, 2019 and we work from Monday to Saturday.
As September 2019 started Sunday my first working day was Monday 2nd, second working day was Tuesday 3rd and third working day was Wednesday 4th.
Last year September 1st was Saturday as we work on Saturdays my first working day was that Saturday, second working day was Monday 3rd, and third working day was Tuesday 4th.

Is there any way to compare this periods of time?

This is just an example I did manually, I'm looking for a formula to do it automatically for the whole year.

Thanks!

 Date 2018 Sales Total Sales Date 2019 Sales Total Sales % Saturday, September 1, 2018 1500 1500 Monday, September 2, 2019 1000 1000 -33.33% Monday, September 3, 2018 2000 3500 Tuesday, September 3, 2019 3500 4500 28.57% Tuesday, September 4, 2018 1800 5300 Wednesday, September 4, 2019 2900 7400 39.62% Wednesday, September 5, 2018 3750 9050 Thursday, September 5, 2019 1800 9200 1.66% Thursday, September 6, 2018 1500 10550 Friday, September 6, 2019 3200 12400 17.54% Friday, September 7, 2018 1200 11750 Saturday, September 7, 2019 1250 13650 16.17% Saturday, September 8, 2018 1100 12850 Monday, September 9, 2019 4000 17650 37.35% Monday, September 10, 2018 3150 16000 Tuesday, September 10, 2019 1900 19550 22.19%

<tbody>
</tbody>

### Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

#### Rijnsent

##### Well-known Member
Hi Daniboy,
it took me a bit of fiddling, but this formula gives the number of workdays in that month for a given day (assuming only sundays are non-workdays).
=DAY(H2)+((DAY(H2)-WEEKDAY(H2,17)+WEEKDAY(DATE(YEAR(H2),MONTH(H2),1),3))/-7)
But other than that: if you want to compare 2 years: I assume you have one cell with the value 01-10-2019 (first day of current month), assuming that in A1, you could do:
=DATE(YEAR(A1),MONTH(A1),1)+IF(WEEKDAY(DATE(YEAR(A1),MONTH(A1),1),3)=6,1,0)
And for the first day of last year, same month:
=DATE(YEAR(A1)-1,MONTH(A1),1)+IF(WEEKDAY(DATE(YEAR(A1)-1,MONTH(A1),1),3)=6,1,0)
After that it's basically +1 for the next day, again correcting for the Sunday.
Hope that helps a bit,
Koen

#### Daniboy

##### New Member
Hi Daniboy,
it took me a bit of fiddling, but this formula gives the number of workdays in that month for a given day (assuming only sundays are non-workdays).
=DAY(H2)+((DAY(H2)-WEEKDAY(H2,17)+WEEKDAY(DATE(YEAR(H2),MONTH(H2),1),3))/-7)
But other than that: if you want to compare 2 years: I assume you have one cell with the value 01-10-2019 (first day of current month), assuming that in A1, you could do:
=DATE(YEAR(A1),MONTH(A1),1)+IF(WEEKDAY(DATE(YEAR(A1),MONTH(A1),1),3)=6,1,0)
And for the first day of last year, same month:
=DATE(YEAR(A1)-1,MONTH(A1),1)+IF(WEEKDAY(DATE(YEAR(A1)-1,MONTH(A1),1),3)=6,1,0)
After that it's basically +1 for the next day, again correcting for the Sunday.
Hope that helps a bit,
Koen
Thank you for that, will do some testing and get back to you!
Daniel