+ Reply to Thread
Results 1 to 7 of 7

How to Count how many date occurances inside a cell AND a range of cells?

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    10-23-2004
    Location
    Los Angeles
    MS-Off Ver
    2010
    Posts
    256

    Question How to Count how many date occurances inside a cell AND a range of cells?

    B3 to I3 (8 difference cells) may or may not contain dates. If there is a date, it's in the format of XX/XX/XXXX. If there is no date, then the cell is blank.
    In addition, inside any one of those 8 cells, there may be MORE THAN ONE date separated by a row.

    How can I get J3 to count how many times there is a date? (In case it matters, the date format is XX/XX/XXXX).


    Example 1: Only I3 has data, and it has two dates, separated by a row inside of the cell.
    Example 2: B3 has 2 dates separated within the cell by a row, and C3 has one date.

    for the J3 formula, Example 1 should give me an answer of 2, and Example 2 should give me an answer of 3.

    What formula do i use to capture this count of dates?
    Attached Files Attached Files
    Last edited by JPWRana; 05-31-2024 at 05:35 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,725

    Re: How to Count how many date occurances inside a cell AND a range of cells?

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file and a mocked up solution.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    10-23-2004
    Location
    Los Angeles
    MS-Off Ver
    2010
    Posts
    256

    Re: How to Count how many date occurances inside a cell AND a range of cells?

    Quote Originally Posted by alansidman View Post
    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file and a mocked up solution.
    Ok, no problem alan. I have uploaded an example. Column J is what the current formula is (and the wrong answer), and Column K shows the DESIRED ANSWER.
    Last edited by JPWRana; 05-31-2024 at 05:36 PM.

  4. #4
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    China Shanghai
    MS-Off Ver
    365 V2503 and WPS V2024(12.1.0.18543)
    Posts
    3,922

    Re: How to Count how many date occurances inside a cell AND a range of cells?

    Cell J2 formula , Drag down
    Formula: copy to clipboard
    =SUMPRODUCT((B2:I2<>"")*(LEN(B2:I2)-LEN(SUBSTITUTE(B2:I2,CHAR(10),))+1))

  5. #5
    Forum Contributor
    Join Date
    10-23-2004
    Location
    Los Angeles
    MS-Off Ver
    2010
    Posts
    256

    Re: How to Count how many date occurances inside a cell AND a range of cells?

    solved!!!

    How does the formula work???

  6. #6
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    China Shanghai
    MS-Off Ver
    365 V2503 and WPS V2024(12.1.0.18543)
    Posts
    3,922

    Re: How to Count how many date occurances inside a cell AND a range of cells?

    JPWRana You're Welcome. Glad to help . Thank You for the feedback and rep.

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,725

    Re: How to Count how many date occurances inside a cell AND a range of cells?

    Click on the formula and then click on the Evaluate Icon on the ribbon to see how the formula works.

+ 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. VBA to find cell value in column and count occurances in same row within date range
    By Furutsun in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-03-2014, 11:55 AM
  2. Replies: 5
    Last Post: 05-11-2012, 03:38 AM
  3. [SOLVED] count date occurances in range of dates...
    By Bob Phillips in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 11:05 AM
  4. [SOLVED] count date occurances in range of dates...
    By Alex in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  5. [SOLVED] count date occurances in range of dates...
    By Bob Phillips in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 07:05 AM
  6. count date occurances in range of dates...
    By Alex in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  7. count date occurances in range of dates...
    By Alex in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  8. [SOLVED] count date occurances in range of dates...
    By Alex in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 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