Need help on Formula

mosesdog

New member
Joined
Jan 2, 2017
Messages
3
Reaction score
0
Points
0
I am using the following formula to calculate the total of hours for each week on the Saturday. Column A is the date, column D is the number of hours, column E is the results of the formula. =IF(WEEKDAY(A7)=7,sum(d2:d7))
With this formula the E7 cell does show the value (sum of the weeks hours) correctly on the Saturday. Days other than Saturday shows FALSE in the E column. I don't want anything or any value to show in the non Saturday cells in the E column.
Can anyone help with this?
Thanks.
 
Last edited:
Just add to the formula like this:

=IF(WEEKDAY(A7)=7,sum(d2:d7),"")
 
Just add to the formula like this:

=IF(WEEKDAY(A7)=7,sum(d2:d7),"")

Thanks. This works for most of it, however when I autofill it increases the d2:d7 by one at each cell (ie d3:d8, then d4:d10). I need it to stay as d2:d7 for seven entries (to encompass the whole week from Sunday to Saturday), then for the next week to change to d8:d13, for the seven days, etc. Is there a way to do this? If I need to change the formula to something different I would be OK with that.
I am trying to make a template to use on a regular basis and I don't want to have to change the reference d2:d7 for every week of the calendar year.
Thanks for your help.
 
Last edited:
Back
Top