Sum Longest streak with IF condition

carlitosz

New Member
Joined
May 7, 2023
Messages
1
Hello,

Based on this previous thread: Sum longest streak

I have this data set, very similar problem, but with a change in orientation:

Total Shifts In RowConsecutive Hours11/1411/1511/1611/1711/1811/1911/20
55.438.478.306.837.635.38

This data goes from D2 (Total Shifts in a Row) to L3 (5.38)

I'm using this in Column D3 to help calculate the max consecutive shifts, which is working perfect.
=IF(arrayformula( max( len( split( join( "", left(F3:AC3 > 0) ), "F" ) ) ) )=24,0,arrayformula( max( len( split( join( "", left(F3:AC3 > 0) ), "F" ) ) ) ))

What I'm looking to get is IF the employee has worked 5 or more shifts (Column D3), then calculate the SUM of the consecutive 5 or 6 days hours worked.

In this case this employee worked 5 consecutive days between 11/14 and 11/18 and the formula on column E3 should provide a total of hours worked of 36.67.

I can't figure this out! I'm using Google Sheets.

1732209617724.png
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,223,889
Messages
6,175,224
Members
452,620
Latest member
dsubash

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top