Forum Discussion
SophieGon
Nov 03, 2022Copper Contributor
Automatize sum of different ranges linked to weekday
Hi guys! I was wondering if you have any suggestions on how to approach this: I receive the hourly consumption of gas in a month, so I have a matrix with the dates in a column and the hours in...
T_Nielsen_
Nov 16, 2022Copper Contributor
Sounds like Filterfunction using the weekday function could help you filter through the Days and then do something similar similar with the timeslots but i expect timeslots dont change so that filter would probably be easier
Here is a command that filters out monday - friday
=LET(Range_;A2:A22;FILTER(Range_;((WEEKDAY(Range_)=2)*1+(WEEKDAY(Range_)=3)*1+(WEEKDAY(Range_)=4)*1+(WEEKDAY(Range_)=5)*1+(WEEKDAY(Range_)=6)*1)))
Here is a command that filters out monday - friday
=LET(Range_;A2:A22;FILTER(Range_;((WEEKDAY(Range_)=2)*1+(WEEKDAY(Range_)=3)*1+(WEEKDAY(Range_)=4)*1+(WEEKDAY(Range_)=5)*1+(WEEKDAY(Range_)=6)*1)))