Count records where date is within the last week

  • Thread starter Thread starter pmjb007
  • Start date Start date
P

pmjb007

I need to count the number of records that have had a date set within the
last week. For reporting other statistics in the same worksheet, i'm use
DCOUNTA, and i assumed i could do the same with this requirement, by using
the TODAY() function. I can't seem to get it to work:-

My data is:-

A B C
DQ001 01/06/2009 01/07/2009
DQ002 14/07/2009

I assumed i could use this:-

=DCOUNTA(A1:C2,"A",D1:E2)

with this criteria range

D E
B B
<today() >today()-7

To produce a count of records where B is within the last week, in this case
the answer would be 1. I'm pretty sure the logic is ok, but can't get it to
work.
 
The below formula will count the number of dates in Column B which are within
the last week...

=COUNTIF(B:B,">" & TODAY()-7)

If this post helps click Yes
 
Back
Top