+ Reply to Thread
Results 1 to 11 of 11

Conditional formatting based on date range

  1. #1
    Registered User
    Join Date
    05-28-2019
    Location
    Lwowek Slaski,Poland
    MS-Off Ver
    office 365
    Posts
    12

    Conditional formatting based on date range

    Hello,
    I need help good people.

    I would like to change colours of cells based on date range in other cells.

    For example:

    cell a5=26.06.2019
    cell a6=29.06.2019

    and now i wish that cells A4:C4 get some colour.

    Is it possible with conditional formating?
    Last edited by AliGW; 07-01-2019 at 12:47 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,719

    Re: Conditional formatting based on date range

    Welcome to the forum!

    What is in cells A4:C4?
    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
    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,929

    Re: Conditional formatting based on date range

    Are those dates real dates?
    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
    Registered User
    Join Date
    05-28-2019
    Location
    Lwowek Slaski,Poland
    MS-Off Ver
    office 365
    Posts
    12

    Re: Conditional formatting based on date range

    Quote Originally Posted by AliGW View Post
    Welcome to the forum!

    What is in cells A4:C4?
    there will be name of the person.

  5. #5
    Registered User
    Join Date
    05-28-2019
    Location
    Lwowek Slaski,Poland
    MS-Off Ver
    office 365
    Posts
    12

    Re: Conditional formatting based on date range

    Quote Originally Posted by FDibbins View Post
    Are those dates real dates?
    Yes, real dates, but I will use all of the dates from the whole year, time range can be diferent.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Conditional formatting based on date range

    I am having trouble visualizing your set up. The range of dates between June 26 and June 29 is 4 days inclusive. The range of names in cells A4:C4 would be 3. Seems as if there would have to be some linkage between the names and dates, as in a list of consecutive dates row 3. Perhaps if you could upload a small desensitized sample of your data it would make it easier for someone to help.
    To upload a sample workbook (not a picture or pasted copy) click on the GO ADVANCED button below the Quick Reply window and then scroll down to Manage Attachments to open the upload window.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Registered User
    Join Date
    05-28-2019
    Location
    Lwowek Slaski,Poland
    MS-Off Ver
    office 365
    Posts
    12

    Re: Conditional formatting based on date range

    Hello,please see if my attached file will help you understand what i'm up to. My attached file is: colour cells based on date range
    Thank you
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Conditional formatting based on date range

    See if the following helps.
    Modify the formula in D8 to read: =IF(D7="",MAX(0,C8-1),IFERROR(IF(D6=D7,1,D7-D6),""))
    (Note that zeros are hidden using custom formatting 0;;;@)
    Modify the last conditional formatting rule for row 3 to read: =D8>0
    Let us know if you have any questions.

  9. #9
    Registered User
    Join Date
    05-28-2019
    Location
    Lwowek Slaski,Poland
    MS-Off Ver
    office 365
    Posts
    12

    Re: Conditional formatting based on date range

    Hello,
    i am speechless, thank you so much for your help. Fantastic this is even better than i expected! :D

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: [solved] Conditional formatting based on date range

    You're Welcome. Thank You for the comment and for marking the thread as 'Solved'. I hope that you have a blessed day.

  11. #11
    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,719

    Re: Conditional formatting based on date range

    For future reference, please select Thread Tools from the menu link above and mark this thread as SOLVED. I have corrected it for you this time.

+ 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] Conditional Formatting Date based on a Named Range set of Dates
    By coreytroy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-07-2018, 02:46 AM
  2. Conditional Formatting Based on Date Range - Gantt
    By fryguythemayor in forum Excel General
    Replies: 9
    Last Post: 11-14-2017, 08:42 AM
  3. Rainbow conditional formatting for a range based of date...
    By jackf-nc in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-31-2016, 03:41 PM
  4. [SOLVED] Conditional formatting dates based on date range and day - pt2
    By dancing-shadow in forum Excel General
    Replies: 5
    Last Post: 01-13-2014, 07:12 AM
  5. [SOLVED] Conditional formatting dates based on date range and day
    By dancing-shadow in forum Excel General
    Replies: 4
    Last Post: 01-07-2014, 01:45 PM
  6. Replies: 8
    Last Post: 11-15-2011, 12:29 PM
  7. Conditional formatting based on date range
    By RGB in forum Excel General
    Replies: 3
    Last Post: 05-23-2006, 12:45 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