+ Reply to Thread
Results 1 to 8 of 8

CountIF for dates

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    06-11-2016
    Location
    Atlanta
    MS-Off Ver
    2016
    Posts
    104

    CountIF for dates

    I need to count the number of treatments on a certain date (which is the number of times a certain date appears). Attached is a representative sample of my data. I think the problem lies in the fact that the data is in the format "1/3/2017 8:00:48 AM" but only shows in the cell "3-Jan". I'm currently using this formula:

    =COUNTIF($F$3:$F$62, B4)

    So, in the data I want to count how many times 3-Jan appears in Column F. and place this count in column C next to 3-Jan in column B (place count in cell C6). I've got a full year of data so ideally you use reference cells so that I don't have to manually type each date in CountIf Formula.

    Thanks in advance guys,

    Matt
    Attached Files Attached Files

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: CountIF for dates

    In C4, try

    =SUMPRODUCT(--(INT($F$3:$F$62)=B4))

    Drag this down column C.

  3. #3
    Forum Contributor
    Join Date
    06-11-2016
    Location
    Atlanta
    MS-Off Ver
    2016
    Posts
    104

    Re: CountIF for dates

    So that works in my example but not in my real data for some reason. I'm getting the #Value error so i'm looking into it. Thank you

  4. #4
    Forum Contributor
    Join Date
    06-11-2016
    Location
    Atlanta
    MS-Off Ver
    2016
    Posts
    104

    Re: CountIF for dates

    Fixed by copying to new tab and filtering out words. Works that way. Thank you

  5. #5
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: CountIF for dates

    Just FYI: All dates and times in Excel have a numerical value. The date is the integer part of the number whereas the time is the decimal part.

    For example, January 3, 2017 3:00 AM has a numerical equivalent of 42738.125 (1/3/2017 = 42738 and 03:00 = 0.125)

    The INT function pulls out the integer value of a cell (i.e. the date without the time).

    The SUMPRODUCT formula counts the number of cells in the range (F3:F62) where the date (the integer value) is equal to the date in B4.

  6. #6
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: CountIF for dates

    Thanks for the rep! If that solved your question, please mark this thread as SOLVED.

  7. #7
    Forum Contributor
    Join Date
    06-11-2016
    Location
    Atlanta
    MS-Off Ver
    2016
    Posts
    104

    Re: CountIF for dates

    Its cuz i'm a die hard Falcons fan

  8. #8
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: CountIF for dates

    1963 Ford Falcon.

    I guess I stole that rep point!

+ 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. COUNTIF using dates
    By bradleyandrewdavis in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-08-2015, 01:45 PM
  2. [SOLVED] COUNTIF with Dates
    By lestergit in forum Excel General
    Replies: 2
    Last Post: 07-19-2011, 02:09 PM
  3. COUNTIF function with Dates & due dates.
    By kcowper in forum Excel General
    Replies: 3
    Last Post: 03-10-2011, 12:51 AM
  4. [SOLVED] Countif using dates
    By Bugaglugs in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 04:05 PM
  5. Countif using dates
    By Bugaglugs in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 PM
  6. Countif using dates
    By Bugaglugs in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 07:05 AM
  7. [SOLVED] Countif using dates
    By Bugaglugs in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 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