+ Reply to Thread
Results 1 to 14 of 14

Date dependent colour changing cells

  1. #1
    Registered User
    Join Date
    10-19-2021
    Location
    Leicester, England
    MS-Off Ver
    Microsoft 365 Apps for Business
    Posts
    9

    Date dependent colour changing cells

    Morning All,

    So I have an excel document that I want to automatically change the colour of the cell depending how close it is to the expiry date.

    Dates are in the UK format.

    For example

    19/04/2022

    When this is within 3 months of expiring I want it to go Yellow

    When it is within 1 month I would like it to be Red

    Anything over 3 months can be green

    Thanks in advance

  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,640

    Re: Date dependent colour changing cells

    Administrative Note

    Welcome to the forum.

    Members will tailor the solutions they offer to the version of Office (Excel) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. Thanks.
    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
    Registered User
    Join Date
    10-19-2021
    Location
    Leicester, England
    MS-Off Ver
    Microsoft 365 Apps for Business
    Posts
    9

    Re: Date dependent colour changing cells

    Thank you I have done this, it is Microsoft 365 Apps for Business

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,714

    Re: Date dependent colour changing cells

    And what about when it has expired, in 6 months time?

    It would help if you attached a sample Excel workbook, as you have given us no information as to which cell has the date, or indeed if there are many dates. The yellow banner at the top of the screen gives details of how to do this.

    Hope this helps.

    Pete

  5. #5
    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,640

    Re: Date dependent colour changing cells

    Assuming the date is in A1, CF rules as follows:

    GREEN =TODAY() < EDATE(A1,-3)
    AMBER =AND(TODAY() > =EDATE(A1,-3),TODAY() < EDATE(A1,-1))
    RED =TODAY() > =EDATE(A1,-1)

    Set the Applies To ... box to cover the entire range of dates to be formatted.

  6. #6
    Registered User
    Join Date
    10-19-2021
    Location
    Leicester, England
    MS-Off Ver
    Microsoft 365 Apps for Business
    Posts
    9

    Re: Date dependent colour changing cells

    So anything greater than 3 months can appear as green
    >1 month but <3 months would be yellow
    <1 month would be red

  7. #7
    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,640

    Re: Date dependent colour changing cells

    See post #5.

    If you are not able to apply the rules suggested, then post a workbook, as advised in post #4.

    There is little point in simply repeating what you've already told us!

  8. #8
    Registered User
    Join Date
    10-19-2021
    Location
    Leicester, England
    MS-Off Ver
    Microsoft 365 Apps for Business
    Posts
    9

    Re: Date dependent colour changing cells

    I believe I have added an attachment
    Attached Files Attached Files

  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,640

    Re: Date dependent colour changing cells

    OK - so which column of dates do you wish to apply it to and what happened when you tried my suggestion?

  10. #10
    Registered User
    Join Date
    10-19-2021
    Location
    Leicester, England
    MS-Off Ver
    Microsoft 365 Apps for Business
    Posts
    9

    Re: Date dependent colour changing cells

    So this should apply to A,B,F,G,I,N-T

    The second formula came up with an error. My understand of Excel if very dated so please bear with me as I am learning as I go

    Thanks

  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,640

    Re: Date dependent colour changing cells

    When you apply the formulae, you will need to remove any blanks I inserted.

    In the attached, I have applied the rules to column Q. You should be able to apply them to the other columns following my example.

    NOTE OF CAUTION:
    I would strongly advise against this level of CF in one table - it will be very hard on the eye, and probably not as effective as you think it will be. Too much CF can be counter-productive.

    AliGW on MS365 Insider (Windows) 32 bit
    Q
    1
    Security & Terrorism - 2 YEARS
    2
    14/01/2023
    3
    30/04/2021
    4
    01/02/2023
    5
    22/01/2023
    6
    12/09/2021
    7
    09/07/2021
    8
    27/09/2022
    9
    18/09/2021
    10
    12/09/2021
    11
    20/08/2021
    12
    22/05/2021
    13
    19/09/2021
    14
    19/08/2021
    15
    09/09/2023
    16
    18/09/2021
    17
    19/01/2023
    18
    16/09/2021
    19
    16/09/2021
    20
    12/04/2023
    21
    17/09/2021
    22
    11/03/2022
    23
    24
    20/01/2023
    25
    26
    17/09/2021
    27
    17/09/2021
    28
    21/01/2023
    29
    07/09/2023
    30
    17/09/2021
    31
    32
    03/03/2023
    33
    17/09/2021
    34
    17/09/2021
    35
    19/09/2021
    36
    15/01/2022
    Sheet: Sheet1
    Attached Files Attached Files
    Last edited by AliGW; 10-19-2021 at 06:21 AM.

  12. #12
    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,640

    Re: Date dependent colour changing cells

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  13. #13
    Registered User
    Join Date
    10-19-2021
    Location
    Leicester, England
    MS-Off Ver
    Microsoft 365 Apps for Business
    Posts
    9

    Re: Date dependent colour changing cells

    Thanks you, think I have cracked this part of the task

  14. #14
    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,640

    Re: Date dependent colour changing cells

    See post #12 for instructions about signing off the thread.

+ 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] Date changing and colour changing if overdue
    By CiaraJ in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-12-2016, 11:41 AM
  2. Re-Do -- Changing colour in cells "Date Dependant"
    By DavoP in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-14-2015, 06:03 PM
  3. Replies: 3
    Last Post: 02-13-2014, 06:31 AM
  4. [SOLVED] Changing colour in cells "Date Dependant"
    By DavoP in forum Excel General
    Replies: 3
    Last Post: 05-06-2013, 10:31 PM
  5. Changing a cell's colour basing on other cells' colour
    By rhua5436 in forum Excel General
    Replies: 11
    Last Post: 09-23-2010, 05:49 AM
  6. Changing Colour of Date
    By Sleepy_Jess in forum Excel General
    Replies: 2
    Last Post: 06-18-2010, 12:20 PM
  7. Replies: 8
    Last Post: 08-22-2009, 10:03 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