Forum Discussion
BRW
Dec 29, 2025Copper Contributor
Need assistance to correct a formula
I am using the following formula to calculate weekly hours. I want to change it to calculate the hours with the starting on Monday going to Sunday and display the result in column G on the Sunday. ...
OliverScheurich
Dec 29, 2025Gold Contributor
=IF(B2="Sun",IFERROR(SUM(INDEX($C$2:C2,LARGE(IF($B$2:B2="Mon",ROW($B$2:B2)-1),1)):
INDEX($C$2:C2,LARGE(IF($B$2:B2="Sun",ROW($B$2:B2)-1),1))),
SUM(INDEX($C$2:C2,1):INDEX($C$2:C2,LARGE(IF($B$2:B2="Sun",ROW($B$2:B2)-1),1)))),"")This formula works in my sample file in Excel 2013 and in modern Excel. The formula must be entered as an arrayformula with ctrl+shift+enter if someone doesn't work with Office 365 or Excel for the web or Excel 2024. The formula is in cell I2 and filled down.