Grouping of dates with COUNTIFS

dmfweb

New Member
Joined
Mar 14, 2014
Messages
29
Office Version
  1. 365
I have a spreadsheet (Shocking... I know) with a bunch of dates and data (again... I will let the shock wash over you)

I am using an IF statement to say if "date" is over 3 days ago put YES, if not, put NO same for 10 days, 20 days, and 30 days... All of that works... but when I go to do a count at the end the total is greater than the number of dates because if a date is greater than 10 days it is obviously greater than 3 days and 5 days and it gets counted in each of those columns also.... (see below)
Is there any way to make it only count each row once (the oldest date)

maybe something with lookup formula and some other math between created date and today()? I would rather not go that route...but I am open to anything....

Appreciate any help

1/3/2023​
12/27/2022​
12/17/2022​
12/7/2022​
15-Dec​
Yes​
Yes​
Yes​
No​
12/31/2022​
Yes​
No​
No​
No​
1-Jan​
Yes​
No​
No​
No​
5-Jan​
No​
No​
No​
No​
12/14/2022​
Yes​
Yes​
Yes​
No​
12/13/2022​
Yes​
Yes​
Yes​
No​
12/12/2022​
Yes​
Yes​
Yes​
No​
12/11/2022​
Yes​
Yes​
Yes​
No​
12/10/2022​
Yes​
Yes​
Yes​
No​
12/9/2022​
Yes​
Yes​
Yes​
No​
12/8/2022​
Yes​
Yes​
Yes​
No​
12/7/2022​
Yes​
Yes​
Yes​
Yes​
12/6/2022​
Yes​
Yes​
Yes​
Yes​
12/18/2022​
Yes​
Yes​
No​
No​
12/16/2022​
Yes​
Yes​
Yes​
No​
Total​
14​
12​
11​
2​
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Use countifs with the maximum, i believe that is ">30" from the description in your post.

For the next one, e.g. ">20" do the same, then subtract the result of the first formula.

Repeat for the rest, each time subtracting the sum of the previous formulas from the count result.
 
Upvote 0
Solution
Use countifs with the maximum, i believe that is ">30" from the description in your post.

For the next one, e.g. ">20" do the same, then subtract the result of the first formula.

Repeat for the rest, each time subtracting the sum of the previous formulas from the count result.
I think that is what I am doing:

=IF(A1<=TODAY()-3, "Yes", "No")
 
Upvote 0
@jason75
Use countifs with the maximum, i believe that is ">30" from the description in your post.

For the next one, e.g. ">20" do the same, then subtract the result of the first formula.

Repeat for the rest, each time subtracting the sum of the previous formulas from the count result.
I think I misunderstood your post the first time....

I knew that logic would work, but after doing this for so many hours I was doing it backwards... thank you!
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,376
Members
449,080
Latest member
Armadillos

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