+ Reply to Thread
Results 1 to 3 of 3

Count occurrences in the last 7 days.

  1. #1
    Registered User
    Join Date
    07-17-2021
    Location
    London
    MS-Off Ver
    2016
    Posts
    24

    Count occurrences in the last 7 days.

    Hi

    Would anybody be able to help me with this Excel request.

    I have two columns of data, A and B. In column A are dates of occurrence and in column B the unit it applies to, either A or B.

    What i would like to do is have column C count the occurrences of either site A or B in the last 7 days based on whatever site (A or B) is listed in column B.

    I have manually entered what I would like to appear in column C as an example. In the actual sheet there are several hundred sites not just A and B and the example uses 17/07/21 as today's date.

    Is this possible?

    Thanks
    T.
    Attached Files Attached Files
    Last edited by Tim2773; 07-17-2021 at 10:36 AM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: Count occurrences in the last 7 days.

    In C2

    =IF($A2>=TODAY()-6,COUNTIFS($B$2:$B$23,$B2,$A$2:$A$23,">=" &TODAY()-6),0)

  3. #3
    Registered User
    Join Date
    07-17-2021
    Location
    London
    MS-Off Ver
    2016
    Posts
    24

    Re: Count occurrences in the last 7 days.

    Thanks, worked perfect!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. A logic formula that counts # if occurrences within the last 90 days
    By tkt1976 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-17-2016, 04:48 PM
  2. [SOLVED] Count the number of occurrences of a particular item in the past 365 days.
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-01-2015, 03:45 PM
  3. [SOLVED] Count occurrences of a value
    By bigband1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-29-2015, 06:57 AM
  4. Count # of Occurrences for specific Reason within 90 Days
    By Victor G in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-23-2015, 02:55 AM
  5. [SOLVED] Need a COUNT on occurrences per day
    By graymatterz in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-22-2014, 11:51 AM
  6. [SOLVED] Count number of occurrences but if there are consecutive matches count them as one
    By michaljireht in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-26-2013, 08:26 PM
  7. Determining If Occurrences Exist Within Past 30 Days
    By amsnss in forum Excel General
    Replies: 1
    Last Post: 01-05-2012, 05:19 PM

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