+ Reply to Thread
Results 1 to 9 of 9

Highlighting value, then un-highlighting after a year

  1. #1
    Registered User
    Join Date
    12-13-2019
    Location
    canada
    MS-Off Ver
    1902
    Posts
    2

    Highlighting value, then un-highlighting after a year

    Hi,

    I'm not sure if this can be done, but I'm hopeful that someone here can help me

    In my spreadsheet, I have names, contract numbers and 4 item columns with dates in them. Ideally, what I would like to happen is the name cell highlights when all the item cells in the row have a value. After the oldest date in the row reaches a year, I'd like it to un-highlight the name cell and highlight the overdue date cell in a different colour. For example, when Dave's row has dates in all 4 item cells, it highlights his name cell green. When the date is 4/3/2020, cell E2 highlights in red and un-highlights Dave's name cell.

    I know I'll need to use Conditional Formatting, but what formulas would I need to put in the cells to have them do this?

    If this can't be done, what formulas would I use to just highlight the item cell when it has value and then un-highlight when the value is over a year old? For example, cells C2:F2 highlight when I put a date in them, but E2 un-highlights when the date is 4/3/2020

    Thanks in advance for any help
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    12-28-2014
    Location
    NSW, Australia
    MS-Off Ver
    MS365
    Posts
    604

    Re: Highlighting value, then un-highlighting after a year

    Hi Callyleth, I think these formulas should work for you:-

    Formatted Red - Applies to: =$C$2:$F$7
    Please Login or Register  to view this content.
    Formatted Green - Applies to: =$A$2:$A$7
    Please Login or Register  to view this content.

    Edit:-
    These highlites would be thrown out by a day during or after a leap year.
    Attached Files Attached Files
    Last edited by Beamernsw; 12-13-2019 at 11:38 PM.

  3. #3
    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,453

    Re: Highlighting value, then un-highlighting after a year

    Why not use EDATE instead? This works with leap years.

    Try:

    =AND(EDATE(C2,12)-1 < TODAY(),C2<>"")

    and:

    =AND(COUNTA(C2:F2)=4,MIN(C2:F2) > EDATE(TODAY(),-12))
    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.

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: Highlighting value, then un-highlighting after a year

    I was trying to post this and kept getting kicked out saying HTML code is not allowed....grrr
    Last edited by AliGW; 12-14-2019 at 03:04 AM.

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

    Re: Highlighting value, then un-highlighting after a year

    Sometimes you have to put spaces either side of the < or > to get it to be accepted - it's a known issue.

  6. #6
    Valued Forum Contributor
    Join Date
    12-28-2014
    Location
    NSW, Australia
    MS-Off Ver
    MS365
    Posts
    604

    Re: Highlighting value, then un-highlighting after a year

    Thanks for the improved formula AliGW, I love seeing functions used that I've never played with before. If only I could remember it all
    But that's what this forum is for....to help find stuff we haven't used before...or better yet, finding stuff we have used but used in an unexpected way.. gotta love that :D

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

    Re: Highlighting value, then un-highlighting after a year

    Absolutely! I have learnt pretty much everything I know here.

  8. #8
    Registered User
    Join Date
    12-13-2019
    Location
    canada
    MS-Off Ver
    1902
    Posts
    2

    Re: Highlighting value, then un-highlighting after a year

    Wow! This is great! Thanks for the help from everyone

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

    Re: Highlighting value, then un-highlighting after a year

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

+ 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: 6
    Last Post: 02-16-2013, 07:29 AM
  2. Replies: 2
    Last Post: 02-06-2013, 12:13 AM
  3. Replies: 0
    Last Post: 02-05-2013, 07:51 AM
  4. highlighting cells with date over a year
    By saraho1703 in forum Excel General
    Replies: 5
    Last Post: 07-12-2012, 09:17 AM
  5. Highlighting a Row
    By JGAGNON in forum Excel General
    Replies: 6
    Last Post: 08-04-2011, 12:10 PM
  6. Highlighting Every Other Row..?
    By suehatesyou in forum Excel General
    Replies: 1
    Last Post: 10-13-2006, 09:51 PM
  7. Replies: 6
    Last Post: 08-28-2005, 05:05 PM
  8. Highlighting Row
    By Mike in forum Excel General
    Replies: 2
    Last Post: 02-08-2005, 03:06 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