+ Reply to Thread
Results 1 to 7 of 7

Count how many dates are within each month

  1. #1
    Forum Contributor
    Join Date
    06-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    144

    Count how many dates are within each month

    Out of a named range that contains dates and blank cells (called date_range) which is 6 columns by a varying number of rows. I'm trying to get a formula that will count how many dates are within January, and another formula for February, March etc.

  2. #2
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Count how many dates are within each month

    could u please provide a sample workbook
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  3. #3
    Forum Contributor
    Join Date
    06-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    144

    Re: Count how many dates are within each month

    example spreadsheet attached
    Attached Files Attached Files

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Count how many dates are within each month

    Hi,

    Put proper dates in I2:I13, i.e. the first day of each month then in J2 copied down

    =COUNTIFS(date_range,">="&I2,date_range,"<="&EOMONTH(I2,0))
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Count how many dates are within each month

    if you rearange the data, with a pivot table.

    See the attached file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  6. #6
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Count how many dates are within each month

    Hi Smally

    try the attached file and confirm

  7. #7
    Forum Contributor
    Join Date
    06-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    144

    Re: Count how many dates are within each month

    Hi guys, thanks for your help.

    Since my data isn't in a normalised format I don't think pivot tables are ideal.

    Both suggested formulas work great, and thankfully all dates in the range will always be in the same year. I was trying to use MONTH() in my own formula which is where I was going wrong.

+ 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] Count Dates In A Month
    By ajocius in forum Excel General
    Replies: 6
    Last Post: 02-02-2015, 05:14 PM
  2. Count one month in a dates range.
    By metkiki in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-28-2014, 01:51 AM
  3. Count workdays for each month between two dates
    By MitchellG in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-16-2013, 02:01 PM
  4. Count the dates in a month
    By s2m via OfficeKB.com in forum Excel General
    Replies: 5
    Last Post: 08-04-2006, 12:40 PM
  5. [SOLVED] Count dates for previous month
    By [email protected] in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-30-2006, 03:45 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