It may not be possible. I don't know.

The formulas in both columns (E and F) are cumulative where the weekly OT hours are added to the previous OT YTD and to the available OT YTD. The sort is performed on columns D,E and F with F being the key.

The formulas after the sort no longer have the correct relationship. The available OT YTD cells sum the row and all rows beneath it. After the sort, the formula stays the same and does not perform the proper totaling of cells beneath that row.