+ Reply to Thread
Results 1 to 9 of 9

Highlight cells based on the dates

  1. #1
    Registered User
    Join Date
    06-29-2021
    Location
    Sydney
    MS-Off Ver
    Microsoft 365
    Posts
    15

    Highlight cells based on the dates

    I want to highlight cells based on the dates in columns D & E.


    Basically, based on the dates in column D & E (which are start and finish dates), the corresponding cells from Col G onwards should be highlighted reflecting the period of the dates. So, in row 7, as the first cell is Dec-22 and greater than start Date this has to be highlighted. For, completion date, the completion is Mar-26. The period after Mar-26 is Jun-26 So, the cells from Dec-22 to Jun-26 should be highlighted.
    I tried using conditional formats, but doesn't seem to work.

    If the date is say Mar-26 (for Row 7) , then cell N7 should also be highlighted as it refers to period after end of Dec to end of june.

    Same thing for Row 12, the Dec-27 cell should be highlighted when sep-27 is the completion date in column E (cell E11).

    Any help will be appreciated.

    Thanks in advance.
    Attached Files Attached Files
    Last edited by subodh.sapkota; 03-11-2024 at 01:18 AM.

  2. #2
    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
    52,946

    Re: Highlight cells based on the dates

    1. your ranges seem disjointed (that shouldnt affect the results, it's just simpler to use complete ranges so you dont miss anything...in fact J9 may be missing)

    2. Your CD formula is a bit involved. What exactly are you testing for? (it looks like part of that formula is testing an empty cell L2 against another empty cell (K26), a text cell (K27) and a cell with an error in it (K28)
    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

  3. #3
    Registered User
    Join Date
    06-29-2021
    Location
    Sydney
    MS-Off Ver
    Microsoft 365
    Posts
    15

    Re: Highlight cells based on the dates

    Hi FDibbins,

    Thanks for your suggestion.

    Basically, based on the dates in column D & E (which are start and finish dates), the corresponding cells from Col G onwards should be highlighted reflecting the period of the dates. So, in row 7, as the first cell is Dec-22 and greater than start Date this has to be highlighted. For, completion date, the completion is Mar-26. The period after Mar-26 is Jun-26 So, the cells from Dec-22 to Jun-26 should be highlighted.

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,627

    Re: Highlight cells based on the dates

    Select G7:Q12. Formula for CF.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 03-11-2024 at 03:44 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Highlight cells based on the dates

    Are you still using XL2013?

  6. #6
    Registered User
    Join Date
    06-29-2021
    Location
    Sydney
    MS-Off Ver
    Microsoft 365
    Posts
    15

    Re: Highlight cells based on the dates

    Thanks for the pickup, adjusted the version.

  7. #7
    Registered User
    Join Date
    06-29-2021
    Location
    Sydney
    MS-Off Ver
    Microsoft 365
    Posts
    15

    Re: Highlight cells based on the dates

    Thanks kvsrinivasamurthy for the input.

    However, this isn't working as expected.

    For example, For row 7, Jun-26 cell should also be selected as Mar-26 falls on this period. Similarly, for row 9, Dec-25 (ie cell M9 should also be highlighted.)

    In row 12, Jun-25 hould not be highlighted only starting from Dec-25 and one more cell uptp Dec-27 ie cell Q12 should be highlighted.Capture.PNG

    see attached screen shot for reference.

  8. #8
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Highlight cells based on the dates

    You can use the formula bellow.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,627

    Re: Highlight cells based on the dates

    Revised formula for CF.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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: 01-11-2021, 01:22 PM
  2. [SOLVED] How Can I: Highlight a Range of Cells Based on Dates?
    By Sandcastle in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-12-2016, 05:55 PM
  3. [SOLVED] Highlight Cells Based on Dates
    By pugsly8422 in forum Excel General
    Replies: 3
    Last Post: 01-27-2015, 01:09 PM
  4. [SOLVED] VBA help need to highlight the cells based on the dates and insert respective cell values.
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-24-2014, 11:14 PM
  5. Using Conditional Formatting to highlight cells based on approaching dates
    By BrutalExcel in forum Excel - New Users/Basics
    Replies: 11
    Last Post: 06-12-2013, 11:56 AM
  6. [SOLVED] Trying to get Excel to highlight cells based on assigned dates.
    By tatumrae in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-10-2013, 08:25 PM
  7. [SOLVED] Excel 2010 Conditional Formatting to Highlight input cells based on Dates
    By chrisb84 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-20-2013, 09:39 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