COUNTING DATES (using countif maybe)

JCORDUNA

New Member
Joined
Aug 14, 2014
Messages
14
Hi;


I need your help on the following scenario, I have a spreadsheet where I have column B structured to highlight in red items that have been opened more than 14 days, to highlight in orange items that have been opened more than 7 days but less than 14, and in yellow to highlight cases that have been opened more than 3 days but less than 7.


What I've been trying to do without success is to count this events, I want to know/count (in individual cells) how many of this are red, how many of this are orange and how many are yellow that of course updates automatically as you enter or delete data. I've been trying to use COUNTIF without success, this are my formulas which all are returning to 0 (which is not ok).


<today()")
<today()")
<today()")
=COUNTIF(B2:B2000, "$B2+14<TODAY()")
=COUNTIF(B2:B2000, "$B2+7<TODAY()")
=COUNTIF(B2:B2000, "$B2+3<TODAY()")
M7Agzhq.jpg
[/IMG]</today()")
</today()")
</today()")
 
Last edited:

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
# of days over 14 days old:

=COUNTIF(B2:B2000,"<"&TODAY()-14)

Between 14 and 7 days old:

=COUNTIFS(B2:B2000,">"&TODAY()-14,B2:B2000,"<"&TODAY()-7)

The rest are similar.
 
Upvote 0
Hi Eric;

thank you very much for your response, I tried to do it with your answer but it is still providing with a result of 0 when I do have several dates in there as you can see on the image I included on my post. Am I doing something wrong here?
 
Last edited:
Upvote 0
Those formulas work fine on my test sheet. My first guess if they are not working for you is that your dates are formatted differently. Are they formatted as dates or text?

How are you applying the colors to those cells? Is it Conditional Formatting? If so, what formulas are you using for that?
 
Upvote 0
Hi Eric;

The dates that I have on that column are formatted as text and yes I am using conditional formatting to apply the colors and this are the formulas:
=$B2+3<today()[ quote]
< today () for yellow</today()[>
<today()[ quote]
=$B2+ 7<today()[ quote]
< today () for orange</today()[>
=$B2+<today()[ quote]
14< today () for red</today()[>
<today() for="" yellow
<today() for="" orange
<today() for="" red=""
Is there a way I can attach my spreadsheet so that you see it?

Here is the link for the document:
https://drive.google.com/open?id=0BzHBlLRftg1maGVORzVvazcyd1E</today()></today()></today()></today()[>
 
Last edited:
Upvote 0
Given the formulas you're using for CF, the COUNTIF formulas should work. I'm at a bit of a loss why they're not. I'll try to think about it some more. Unfortunately, I'm unable to download files at my location. Perhaps someone else can and they'll spot the issue.
 
Last edited:
Upvote 0
# of days over 14 days old:

=COUNTIF(B2:B2000,"<"&TODAY()-14)

Between 14 and 7 days old:

=COUNTIFS(B2:B2000,">"&TODAY()-14,B2:B2000,"<"&TODAY()-7)

The rest are similar.

Hi Eric;

I was able to make this two work but I was not able to make the one Between 7 and 3 days old to work, I am using the following formula.
=COUNTIFS(Table3[Column1],">"&TODAY()-7,Table3[Column1],"<"&TODAY()-3)

Is this correct?
 
Upvote 0
That looks fine. One thought is that maybe you want to change the operators to "greater than or equal to" like so:

=COUNTIFS(Table3[Column1],">="&TODAY()-7,Table3[Column1],"<="&TODAY()-3)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,095
Messages
6,128,792
Members
449,468
Latest member
AGreen17

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