+ Reply to Thread
Results 1 to 8 of 8

Counting a range of cells with dates within a certain range

Hybrid View

  1. #1
    Registered User
    Join Date
    02-28-2008
    Posts
    12

    Counting a range of cells with dates within a certain range

    I am trying to count a range of cells with a value between a certain date. In this sheet, I document visits to particular properties with the date, and I want to count a monthly total of visits at the bottom.

    I want to count all the cells in the within the sheet that contain a date in January, February, March, etc. but not count the start and end dates.

    BTW, This forum is an incredible resource, which I've used a number of times. Thanks for all who contribute.
    Attached Files Attached Files

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

    Re: Counting a range of cells with dates within a certain range

    In D12:

    =COUNTIFS($D$2:$O$9,"<="&EOMONTH("2016/12/31",COLUMNS($A:A)),$D$2:$O$9,">0")-SUM($C12:C12)
    Drag accross
    Quang PT

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,411

    Re: Counting a range of cells with dates within a certain range

    I'm not sure what you mean by:

    ... but not count the start and end dates ...
    but you need to format cell D12 in your example file as General to get it to display 19 - is that the answer that you expect from your data?

    Hope this helps.

    Pete

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524

    Re: Counting a range of cells with dates within a certain range

    if you have the first day of the month in D11:O11 then format that cell to just display months.
    Use this formula for D12 and drag it across.
    Formula: copy to clipboard
    =COUNTIFS($D$2:$O$9,">"&D11,$D$2:$O$9,"<"&EOMONTH(D11,0))

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

    Re: Counting a range of cells with dates within a certain range

    After checking again, try again:

    =COUNTIFS($D$2:$O$9,"<"&EOMONTH("2016/12/31",COLUMNS($A:A)),$D$2:$O$9,">"&EOMONTH("2016/12/31",COLUMNS($A:A)-1)+1)

  6. #6
    Registered User
    Join Date
    02-28-2008
    Posts
    12

    Re: Counting a range of cells with dates within a certain range

    Thanks guys. The formula from bebo 021999 and davesexcel both work on my sample, but unfortunately I cannot figure out which
    cells to adjust in my actual spreadsheet. Here is the actual one I'm using with the location info taken out. I DO want to count
    dates in both "open" and "closed" sections


    DaveUK, I meant that I didn't want to count the Start and End date columns.

  7. #7
    Registered User
    Join Date
    02-28-2008
    Posts
    12

    Re: Counting a range of cells with dates within a certain range

    Lost the attachment.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    02-28-2008
    Posts
    12

    Re: Counting a range of cells with dates within a certain range

    I was able to get davesexcel's formula to work. Thanks again!

+ 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. [SOLVED] Counting dates in range
    By cjharwood in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-01-2015, 11:12 PM
  2. [SOLVED] Counting how many times a range of key words come up in a range of cells
    By Piepongwong in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-04-2014, 02:38 PM
  3. Counting dates within a range
    By mhitomi_7 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-02-2013, 08:05 PM
  4. Counting dates between a range
    By mungel in forum Excel General
    Replies: 2
    Last Post: 05-23-2010, 10:48 PM
  5. Counting dates in a range
    By stevewilde in forum Excel General
    Replies: 4
    Last Post: 07-07-2009, 07:30 AM
  6. [SOLVED] counting valid dates in a range of cells
    By TBA in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-28-2006, 11:45 PM
  7. Counting Dates in a Range
    By Matt7102 in forum Excel General
    Replies: 9
    Last Post: 01-13-2006, 07:20 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