+ Reply to Thread
Results 1 to 5 of 5

Counting events in a date table over 24 hours old.

  1. #1
    Registered User
    Join Date
    07-10-2013
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    15

    Counting events in a date table over 24 hours old.

    Hello

    I am creating a simple table which lists particular events/incidents that happen during the day, the date that they happened and whether they are still outstanding.

    The table has 3 columns:

    Coumn A - Incident
    Column B - Date
    Column C - Complete (Y/N).

    At the top of the worksheet I have today's date (using the TODAY function).

    I need a simple way to add up the number of incidents which are over 24 hours old if that makes any sense!!

    Any help???

    Thanks in advance!!!

    Sam

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,051

    Re: Counting events in a date table over 24 hours old.

    Take a look at using the countif() function, using "<"&today() as the criteria
    Last edited by FDibbins; 11-06-2013 at 01:22 AM.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Counting events in a date table over 24 hours old.

    hi sambashir. do you have time inside column B? if you do, then you should use NOW() instead of TODAY(). assuming TODAY() is in E1, try:
    =COUNTIF(B:B,"<="&E1-1)

    so if today is 6 Nov 13, it counts 5 Nov 13 & prior dates. if it doesn't work, I suggest you upload an Excel file in the thread. To do that, Click on GO ADVANCED and use the paperclip icon to open the upload window.
    View Pic
    and to illustrate your example better, click on How To Get Quick & Good Answers

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Counting events in a date table over 24 hours old.

    you could use something like this:
    Assumes Today in A1 and Data starts in row 3
    =SUMPRODUCT(--(B1:B1000<=(A1-1))
    Although, this wont guarantee 24 hrs, just none from today
    You could use the NOW() funftion in A1 and format as date, then it would work to exclude anything less than 24hrs old

    Hope this Helps
    Last edited by dredwolf; 11-06-2013 at 01:25 AM. Reason: forgot the "<" :(
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  5. #5
    Registered User
    Join Date
    07-10-2013
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Counting events in a date table over 24 hours old.

    Guys, thank you for your replies!!

    benishiryo - i used the method you suggested - works a charm!

    thank you!

+ 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. Replies: 10
    Last Post: 05-12-2014, 10:51 PM
  2. Need help counting events within a certain date ranges
    By i.suck.at.excell in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-25-2012, 11:32 PM
  3. Counting in specific events in a date range
    By chamaile0n in forum Excel General
    Replies: 5
    Last Post: 08-18-2008, 04:00 PM
  4. Date (hours and still counting)
    By _Bigred in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-31-2006, 11:30 PM
  5. I need to measure hours between two events(time/date) to give me .
    By iartis in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-11-2005, 10:06 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