+ Reply to Thread
Results 1 to 4 of 4

Count Number of Dates in Range That are Within a Certain Year

  1. #1
    Registered User
    Join Date
    04-03-2020
    Location
    NYC
    MS-Off Ver
    365 Pro Plus
    Posts
    72

    Lightbulb Count Number of Dates in Range That are Within a Certain Year

    What formula would be best do count the number of dates (i.e. 3/12/21, 5/22/22, 9/1/21) in a range of cells BUT excluding any of the cells with "", or null values?

    =SUMPRODUCT(--(YEAR(B2:B68)=2021)) <-- I've tried this formula but the empty cells cause it to output an error.

    Thanks!
    Last edited by jk2391; 09-21-2021 at 10:15 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,726

    Re: Count Number of Dates in Range That are Within a Certain Year

    Try this:

    =SUMPRODUCT(--(YEAR(B2:B68)=2021)*(B2:B68<>""))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    04-03-2020
    Location
    NYC
    MS-Off Ver
    365 Pro Plus
    Posts
    72

    Re: Count Number of Dates in Range That are Within a Certain Year

    yes, that worked. Thank you very much!

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,726

    Re: Count Number of Dates in Range That are Within a Certain Year

    No problem.

    You may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. Count number of days between dates in selected year
    By Undo in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-14-2021, 01:04 PM
  2. [SOLVED] Count number of days between dates in last two year
    By Undo in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 07-14-2021, 11:52 AM
  3. Replies: 3
    Last Post: 06-02-2020, 12:12 PM
  4. Count number of Dates in a range that match Year and month
    By the_penfool in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-13-2015, 11:49 AM
  5. Replies: 3
    Last Post: 10-27-2014, 06:03 PM
  6. [SOLVED] How do I count number of occurrences (dates) in a rolling year?
    By ShirleyTR in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-22-2005, 02:05 PM
  7. count dates within range by year and month
    By Isaiah25 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 05-04-2005, 06: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