+ Reply to Thread
Results 1 to 7 of 7

Count yes/no in years with dates given

  1. #1
    Registered User
    Join Date
    10-11-2015
    Location
    Munich
    MS-Off Ver
    2010
    Posts
    3

    Count yes/no in years with dates given

    Hello Forum-Members,

    I was wondering if you could help me out with a formular. I would like to count amount of yes/no at specific dates but for years 2015,2014,2013...

    Unfortunately I have no idea how to solve this problem - attached excel file is an example of my list.

    Thanks for your help - highly appreciated.

    Best, Anton
    Attached Files Attached Files

  2. #2
    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: Count yes/no in years with dates given

    Put this formula in cell F2:

    =SUMPRODUCT((YEAR($A$2:$A$8)=$E2)*($B$2:$B$8=F$1))

    Copy into G2, then copy those two formulae down.

    Hope this helps.

    Pete

  3. #3
    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,048

    Re: Count yes/no in years with dates given

    Try this, copied down and across...
    =COUNTIFS($A:$A,">="&DATE($E2,1,1),$A:$A,"<="&DATE($E2,12,31),$B:$B,F$1)
    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

  4. #4
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,650

    Re: Count yes/no in years with dates given

    Or a pivot table will do
    All three in this file
    Attached Files Attached Files
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  5. #5
    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,048

    Re: Count yes/no in years with dates given

    Pivot Table and SUMPRODUCT are both very good options, but both would potentially need the ranges to be adjusted as more data is added...countifS() using column ranges does not need adjusting

  6. #6
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Count yes/no in years with dates given

    Quote Originally Posted by FDibbins View Post
    Pivot Table and SUMPRODUCT are both very good options, but both would potentially need the ranges to be adjusted as more data is added...countifS() using column ranges does not need adjusting
    If the source data is converted into an Excel Table, then this will not be an issue.

  7. #7
    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,048

    Re: Count yes/no in years with dates given

    Quote Originally Posted by dflak View Post
    If the source data is converted into an Excel Table, then this will not be an issue.
    True, but that was not a suggestion - so far

+ 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] How to Format Dates to Colors, That Are Over 1 Year, 2 Years, and 3+ Years
    By KAB923 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-03-2015, 10:46 AM
  2. Replies: 4
    Last Post: 10-17-2013, 09:59 AM
  3. [SOLVED] Count number of specific dates within several years
    By thed85 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-08-2013, 12:55 PM
  4. Replies: 4
    Last Post: 03-29-2012, 09:01 PM
  5. [SOLVED] Count Years Between Two Dates
    By sgwilliams in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-07-2011, 09:03 AM
  6. how to count dates and divide in years
    By DMR1712 in forum Excel General
    Replies: 3
    Last Post: 07-16-2010, 02:46 AM
  7. count number of years 2003 in a range of dates
    By Stan Altshuller in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-03-2005, 03: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