count of date outside range

mikenz1983

New Member
Joined
Oct 2, 2014
Messages
33
Hi

i have a range of dates for a survey that was completed with a due date of completion
i am wanting to identify how many sit outside the close date range

for example if the close date was 22/07/2021, how many in the range of cells are between 1-4 days late 5 and 9 days late and then how many are later than that
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Maybe something like this:
Book1
ABCDEF
1Completed DateDue7/22/2021
27/2/2021Days Late
37/22/20211-4 days5-9 days10 or more
47/24/2021212
57/25/2021
68/15/2021
77/31/2021
88/18/2021
Sheet2
Cell Formulas
RangeFormula
D4D4=SUMPRODUCT(($A$2:$A$8-$D$1>0)*($A$2:$A$8-$D$1<=4))
E4E4=SUMPRODUCT(($A$2:$A$8-$D$1>=5)*($A$2:$A$8-$D$1<=9))
F4F4=SUMPRODUCT(--($A$2:$A$8-$D$1>9))
 
Upvote 0
thanks for that really helpful, i have adjusted to my range and it is miss counting by 2 and i think it has something to do with the 5-9 range
below is what i have

Total completes = 45
withing timeframe = =COUNTIFS(Changed!C2:C45,"<15/05/2021") ---------------- 32
1-4 days late = =SUMPRODUCT((Changed!C2:C45-$B$2>0)*(Changed!C2:C45-$B$2<=4)) ---------------- 5
5-9 days late = =SUMPRODUCT((Changed!C2:C45-$B$2>=5)*(Changed!C2:C45-$B$2<=9)) --------------- 0
10+ days late = =SUMPRODUCT(--(Changed!C2:C45-$B$2>9)) ----------------------------------------------- 6

when i add the above up i am short 2
the below is what i have as raw data, i am counting manually that i have 6 dates that are between 1-4 days late , 1 that should sit in the 5-9 period and 5 beyond that

below is a dump of that data, unsure if i am doing something wrong here

34​
1​
17/05/2021​
35​
1​
17/05/2021​
36​
1​
18/05/2021​
37​
1​
18/05/2021​
38​
1​
18/05/2021​
40​
1​
19/05/2021​
41​
1​
24/05/2021​
42​
1​
1/06/2021​
43​
1​
2/06/2021​
45​
1​
23/06/2021​
46​
1​
30/06/2021​
47​
1​
21/07/2021​

Maybe something like this:
Book1
ABCDEF
1Completed DateDue7/22/2021
27/2/2021Days Late
37/22/20211-4 days5-9 days10 or more
47/24/2021212
57/25/2021
68/15/2021
77/31/2021
88/18/2021
Sheet2
Cell Formulas
RangeFormula
D4D4=SUMPRODUCT(($A$2:$A$8-$D$1>0)*($A$2:$A$8-$D$1<=4))
E4E4=SUMPRODUCT(($A$2:$A$8-$D$1>=5)*($A$2:$A$8-$D$1<=9))
F4F4=SUMPRODUCT(--($A$2:$A$8-$D$1>9))
[
Cell Formulas
RangeFormula
 
Upvote 0
I don't see anything wrong with your formula. I assume all the dates in your C2:C45 range are all true Excel dates and none are text.

As you can see below the formula seems to work.

Book1
ABCDEF
1DaysDue
23415/17/202125/15/2021
33515/17/20212
43615/18/202135 - 9 days
53715/18/202133
63815/22/20217
74015/19/20214
84115/24/20219
94215/23/20218
104316/2/202118
114516/23/202139
124616/30/202146
134717/21/202167
Sheet1
Cell Formulas
RangeFormula
F5F5=SUMPRODUCT(($C$2:$C$13-$F$2>=5)*($C$2:$C$13-$F$2<=9))
D2:D13D2=C2-$F$2
 
Upvote 0

Forum statistics

Threads
1,214,784
Messages
6,121,536
Members
449,037
Latest member
tmmotairi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top