Hello All,

I'm trying to figure out how to sum the number of products produced during a shift. I've come up with a formula for summing products by day, but am drawing a blank on how to do it by shift. Here is the formula for summing by day:

=IF(DAY(NOW())>DAY(T$3046),SUMPRODUCT($B$1000:$B$10000-$C$1000:$C$10000,(DAY($F$1000:$F$10000)=DAY(T$3046))*($D$1000:$D$10000=$L3058)),NA())

T3046 is the date I'm searching against
L3058 is the commodity I'm searching against
Column B is the number of good products entered for a data record
Column C is the number of defective products entered for a data record
Column D is the commodity entered for a data record
Column F is the date and time the information was entered into the spreadsheet with the associated data record

The shifts go like this for 10/22: 10/22 A shift is 10/22 06:00 - 10/22 18:00 and 10/22 B shift is 10/22 18:00 - 10/23 06:00

Thanks in advance