+ Reply to Thread
Results 1 to 5 of 5

Count instances in last week

Hybrid View

  1. #1
    Registered User
    Join Date
    02-16-2013
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    2

    Count instances in last week

    I have a list in column A of dates for every event day (e.g. the 2., 3., 10., 13., and 14. of febuary 2013) and in column B i would very much like a formula to count the number of event days, but only for the last 7 days. In other words, i need to read out the pace over the last 7 days in terms of events/week. I cannot get COUNTIF to have a variabel cell as criteria. Can you help?

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Count instances in last week

    Try something like

    =COUNTIFS(A:A,">"&NOW()-7,A:A,">"&NOW())
    Martin

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Count instances in last week

    @mrice, as per your idea it may be shorten
    =COUNTIF(A:A,">"&NOW()-7)

    In my opinion, the last date may be not today:
    =COUNTIF(A:A,">"&(MAX(A:A)-7))
    Quang PT

  4. #4
    Registered User
    Join Date
    02-16-2013
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Count instances in last week

    Thanks alot! This formula seemed to work:

    =COUNTIF(A$1:A1;">"&(MAX(A$1:A1)-7))/7

    What does the syntax ">"&(MAX(A$1:A1)-7 mean?

  5. #5
    Valued Forum Contributor
    Join Date
    02-05-2013
    Location
    Jakarta, Indonesia
    MS-Off Ver
    Excel 2013
    Posts
    571

    Re: Count instances in last week

    Try this:
    =MAX(A$1:A10)
    and this:
    =MAX(A$1:A10)-7
    you will know from the result


    Regards,
    SDCh

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1