+ Reply to Thread
Results 1 to 7 of 7

Help getting the interval of dates corresponding to one "yes" / "no" cells

  1. #1
    Forum Contributor
    Join Date
    05-09-2013
    Location
    london
    MS-Off Ver
    Excel 2016
    Posts
    107

    Help getting the interval of dates corresponding to one "yes" / "no" cells

    Dear all,

    I have one excel file with thousands of rows composed of a date and a "yes" / "no" column, just like this:

    Please Login or Register  to view this content.
    I need help on a code that can search for where I have "YES" cells and then write on column C the intervals where I have YES, for example on this case would be from 01/01/2020 to 03/01/2020

    I attach an example file of what my spreadsheet looks like and an expected result of the code.

    Thanks so much for any help!

    Regards
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Help getting the interval of dates corresponding to one "yes" / "no" cells

    Without VBA, just using formulas you can get results as shown in attached.
    formula in column D [helper column. you can hide it]

    HTML Code: 
    Formula in column C [where you want the results]

    HTML Code: 
    This is an array formula. You need to enter this with ctrl+shft+ent.

    see attached file.
    Attached Files Attached Files
    1. Click on the * Add Reputation if you think this helped you
    2. Mark your thread as SOLVED when question is resolved

    Modytrane

  3. #3
    Forum Contributor
    Join Date
    05-09-2013
    Location
    london
    MS-Off Ver
    Excel 2016
    Posts
    107

    Re: Help getting the interval of dates corresponding to one "yes" / "no" cells

    Dear modytrane,

    First of all my apologies for the late reply. Had some internet connectivity issues.
    Second, thank you so much for your time and for your code that works, although with some issues:

    - I have a lot of spreadsheets with more than 100,000 lines each. The computer time calculation for each spreadsheet it is huge (sometimes more than 20min each). But more problematic than that, sometimes Excel crashes saying that I do not have sufficient resources to perform the calculation and then it simply crashes.

    My question is if there is any code tweak or any optimization to perform this task?

    Again thank you so much for your time!
    Regards

  4. #4
    Forum Contributor
    Join Date
    05-09-2013
    Location
    london
    MS-Off Ver
    Excel 2016
    Posts
    107

    Re: Help getting the interval of dates corresponding to one "yes" / "no" cells

    Can someone give me help on this please?

    I'm kind of lost right now!

  5. #5
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Help getting the interval of dates corresponding to one "yes" / "no" cells

    Please Login or Register  to view this content.
    Last edited by nigelog; 01-16-2020 at 12:55 PM.

  6. #6
    Forum Contributor
    Join Date
    05-09-2013
    Location
    london
    MS-Off Ver
    Excel 2016
    Posts
    107

    Re: Help getting the interval of dates corresponding to one "yes" / "no" cells

    Dear nigelog,

    Thank you so much for your help!! This code works perfectly!!! Can't thank you enough!!!!
    I will give you reputation that you deserve!

    Thank you!!

  7. #7
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Help getting the interval of dates corresponding to one "yes" / "no" cells

    Glad it worked out for you. Thankyou for the rep points and the kind feedback

+ 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: 5
    Last Post: 02-05-2019, 12:03 AM
  2. Replies: 2
    Last Post: 07-24-2017, 02:19 AM
  3. [SOLVED] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  4. Replies: 5
    Last Post: 01-23-2014, 11:02 AM
  5. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  6. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  7. [SOLVED] Data validation: allow entry into a cell if other three cells have "X", "Y" and "Z"?
    By RogerRangeRover in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-05-2013, 04:49 AM

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