+ Reply to Thread
Results 1 to 12 of 12

Count cell with different date and year exist

  1. #1
    Forum Contributor
    Join Date
    02-20-2022
    Location
    Indonesia
    MS-Off Ver
    Excel 2016
    Posts
    103

    Wink Count cell with different date and year exist

    Hi,,

    I need to count number of a different date in a cells, but I just want to count it as a one if there is a same date in a cell.

    Is there any formula to fix it, Mr bebo help me with just one year, what if i want to make it monthly/year.


    Thanks,

    I already attachh the example.
    Last edited by Sultan1994; 07-05-2023 at 04:26 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,956

    Re: Count cell with different date and year exist

    Is this still for Excel 2016?
    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
    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,956

    Re: Count cell with different date and year exist

    Try this:

    =SUMPRODUCT(($A$3:$A$42>=(DATE(YEAR(E3),MONTH(E3),1)))*($A$3:$A$42<=E3))
    Last edited by AliGW; 07-05-2023 at 03:57 AM. Reason: Workbook added.

  4. #4
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,005

    Re: Count cell with different date and year exist

    F3
    =IF(E3="","",SUMPRODUCT(($A$3:$A$100<>"")*(TEXT($A$3:$A$100,"yyyymm")=TEXT(E3,"yyyymm"))))

    copied down.

  5. #5
    Forum Contributor
    Join Date
    02-20-2022
    Location
    Indonesia
    MS-Off Ver
    Excel 2016
    Posts
    103

    Re: Count cell with different date and year exist

    Im so sorry, there is mistake in my Example.

    Jan 2022 3
    Feb 2022 3
    Mar 2022 2
    Apr 2022 4
    May 2022 4
    Jan 2023 3
    Feb 2023 3
    Mar 2023 2
    Apr 2023 4
    May 2023 4


    It should just count a different date, same date will count as one.. Thanks

  6. #6
    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,956

    Re: Count cell with different date and year exist

    You have just shifted the goalposts!

    Do you still have Excel 2016 or something newer?
    Last edited by AliGW; 07-05-2023 at 04:24 AM. Reason: Typo fixed.

  7. #7
    Forum Contributor
    Join Date
    02-20-2022
    Location
    Indonesia
    MS-Off Ver
    Excel 2016
    Posts
    103

    Re: Count cell with different date and year exist

    I use Excel 2016
    Last edited by AliGW; 07-05-2023 at 04:24 AM. Reason: Please do NOT quote unnecessarily!

  8. #8
    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,956

    Re: Count cell with different date and year exist

    Thanks for comfirming.

  9. #9
    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,956

    Re: Count cell with different date and year exist

    Try this:

    =SUM(IF($A$3:$A$42>=(DATE(YEAR(E3),MONTH(E3),1)),IF($A$3:$A$42<=E3,1/(COUNTIFS($A$3:$A$42,">="&(DATE(YEAR(E3),MONTH(E3),1)),$A$3:$A$42,"<="&E3,$A$3:$A$42,$A$3:$A$42)),0)))

    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).

  10. #10
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,914

    Re: Count cell with different date and year exist

    Or try this

    =IF(E3="","",COUNT(MATCH(ROW(INDIRECT(EOMONTH(E3,-1)+1&":"&E3)),$A$3:$A$42,0)))

    Enter with Ctrl+Shift+Enter.

  11. #11
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,294

    Re: Count cell with different date and year exist

    Power Query
    Please Login or Register  to view this content.

  12. #12
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,294

    Re: Count cell with different date and year exist

    Corrected according to your file
    Please Login or Register  to view this content.

+ 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. Replies: 3
    Last Post: 06-26-2019, 11:46 AM
  2. [SOLVED] sumproduct to count year values in range based on another cell year value
    By mr_mango81 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-04-2017, 12:46 AM
  3. [SOLVED] Count cell only if date matches current month & year
    By SadOfficeWorker in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-14-2016, 02:51 AM
  4. [SOLVED] Count a cell value how many times exist in a range
    By donk04 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-07-2015, 10:45 AM
  5. [SOLVED] count if date in another cell falls in certain month and year
    By ea223 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-18-2012, 07:17 PM
  6. [SOLVED] Does a 'count if higher than other cell' function exist?
    By Apparas in forum Excel General
    Replies: 4
    Last Post: 10-08-2012, 11:06 AM
  7. [SOLVED] Count days for specific year falling within in multi-year date range
    By jslo2013 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-04-2012, 05:58 PM

Tags for this Thread

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