We have a sheet that we use for time tracking for some of our projects. We have about a dozen people supporting projects and they may log their time multiple times a day.  I have a SUMIFS formula that adds the duration for each client project. 
Formula: =SUMIFS(Duration:Duration, [Client ID]:[Client ID], [Client ID]@row ) 
I want the formula to be dynamic, i.e., I don't want to program a separate formula every time we add a client or new technician. As soon as we get 5001 time entries, we get the 25000000 formula cell reference limit error because the formula looks at all 5001 rows for each formula on each of the 5001 rows. 5001 * 5001 is greater than 25000000.
The question is: does anyone have any suggestions for a formula that is dynamic that will work when we exceed 5000 rows?