I am having trouble summing a column if a date is between (or equal to) a date range.
The column to total is P
The start date if the range is in column Q
The end date of the range is in column R
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]P[/TD]
[TD="align: center"]Q[/TD]
[TD="align: center"]R[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Time[/TD]
[TD]Start Date[/TD]
[TD]Stop Date[/TD]
[/TR]
[TR]
[TD]Row 3[/TD]
[TD]0:20[/TD]
[TD]7/16/2018[/TD]
[TD]7/17/2018[/TD]
[/TR]
[TR]
[TD]Row 4[/TD]
[TD]0:30[/TD]
[TD]7/16/2018[/TD]
[TD]7/16/2018[/TD]
[/TR]
[TR]
[TD]Row 5[/TD]
[TD]0:10[/TD]
[TD]7/17/2018[/TD]
[TD]7/20/2018[/TD]
[/TR]
[TR]
[TD]Row 6[/TD]
[TD]1:15[/TD]
[TD]7/18/2018[/TD]
[TD]7/19/2018[/TD]
[/TR]
[TR]
[TD]Row 7[/TD]
[TD]0:05[/TD]
[TD]7/19/2018[/TD]
[TD]7/20/2018[/TD]
[/TR]
</tbody>[/TABLE]
The dates to compare are
Dates to compare to is in Cell E4, F5, F6, F7
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]G[/TD]
[TD="align: center"]H[/TD]
[TD="align: center"]I[/TD]
[/TR]
[TR]
[TD]Row 4[/TD]
[TD]7/16/2018[/TD]
[TD]7/17/2018[/TD]
[TD]7/18/2018[/TD]
[TD]7/19/2018[/TD]
[TD]7/20/2018[/TD]
[/TR]
[TR]
[TD]Row 5[/TD]
[TD]sum[/TD]
[TD]sum[/TD]
[TD]sum[/TD]
[TD]sum[/TD]
[TD]sum[/TD]
[/TR]
</tbody>[/TABLE]
The formula needs to include the start and stop date listed above as well as any date between them.
Example Cell E5 should sum to be 0:20 and Cell H5 should sum to be 1:30
The formula I was working with is "=SUMIFS(P3:P7,Q3:Q7,">="&E4,R3:R7,"<="&E4) but is not working
The column to total is P
The start date if the range is in column Q
The end date of the range is in column R
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]P[/TD]
[TD="align: center"]Q[/TD]
[TD="align: center"]R[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Time[/TD]
[TD]Start Date[/TD]
[TD]Stop Date[/TD]
[/TR]
[TR]
[TD]Row 3[/TD]
[TD]0:20[/TD]
[TD]7/16/2018[/TD]
[TD]7/17/2018[/TD]
[/TR]
[TR]
[TD]Row 4[/TD]
[TD]0:30[/TD]
[TD]7/16/2018[/TD]
[TD]7/16/2018[/TD]
[/TR]
[TR]
[TD]Row 5[/TD]
[TD]0:10[/TD]
[TD]7/17/2018[/TD]
[TD]7/20/2018[/TD]
[/TR]
[TR]
[TD]Row 6[/TD]
[TD]1:15[/TD]
[TD]7/18/2018[/TD]
[TD]7/19/2018[/TD]
[/TR]
[TR]
[TD]Row 7[/TD]
[TD]0:05[/TD]
[TD]7/19/2018[/TD]
[TD]7/20/2018[/TD]
[/TR]
</tbody>[/TABLE]
The dates to compare are
Dates to compare to is in Cell E4, F5, F6, F7
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]G[/TD]
[TD="align: center"]H[/TD]
[TD="align: center"]I[/TD]
[/TR]
[TR]
[TD]Row 4[/TD]
[TD]7/16/2018[/TD]
[TD]7/17/2018[/TD]
[TD]7/18/2018[/TD]
[TD]7/19/2018[/TD]
[TD]7/20/2018[/TD]
[/TR]
[TR]
[TD]Row 5[/TD]
[TD]sum[/TD]
[TD]sum[/TD]
[TD]sum[/TD]
[TD]sum[/TD]
[TD]sum[/TD]
[/TR]
</tbody>[/TABLE]
The formula needs to include the start and stop date listed above as well as any date between them.
Example Cell E5 should sum to be 0:20 and Cell H5 should sum to be 1:30
The formula I was working with is "=SUMIFS(P3:P7,Q3:Q7,">="&E4,R3:R7,"<="&E4) but is not working
Last edited: