Ok, this is fairly complicated!
Enter this formula in CK4. This will return the count where the hours are
greater than 28.
=COUNTIF(CJ5:CJ65,">28")
Enter this array formula** in CK5:
=IF(ROWS(CK$5:CK5)>CK$4,"",INDEX(CG$5:CG$65,MATCH(SMALL(IF(CJ$5:CJ$65>28,CJ$5:CJ$65+ROW(CJ$5:CJ$65)/10^10),ROWS(CK$5:CK5)),IF(CJ$5:CJ$65>28,CJ$5:CJ$65+ROW(CJ$5:CJ$65)/10^10),0)))
** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.
Copy down until you get blanks.
We could use a less complicated method but it would require the use of a
column of helper formulas.