+ Reply to Thread
Results 1 to 10 of 10

Conditional formatting

  1. #1
    Registered User
    Join Date
    09-14-2015
    Location
    ipswich, england
    MS-Off Ver
    2010
    Posts
    31

    Conditional formatting

    I have a spreadsheet that when I enter a date of an invoice issued for example 1st October 2019 in cell G68, cell L68 has the formula '=G68+30' which shows a date 30 days (31st October 2019) after the invoice has been issued. What I would like to do is for the cell background to change to red if the current date is greater than 30 days. So if the actual date is 1st November 2019 the cell background would be red making it easier to determine which invoices need chasing.

    Thanks.

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,075

    Re: Conditional formatting

    How about
    =L68< TODAY()-30

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Conditional formatting

    Expanding on that

    you might need

    =AND(L68<>"",L68< TODAY()-30)

    if you have (as yet) unentered dates
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Registered User
    Join Date
    09-14-2015
    Location
    ipswich, england
    MS-Off Ver
    2010
    Posts
    31

    Re: Conditional formatting

    Thank you both. I pasted both in and formatted the cell to turn red but it didn't work. I changed both formula to
    =L68< TODAY()-30
    =L68> TODAY()-30

    and

    =AND(L68<>"",L68< TODAY()-30)
    =AND(L68<>"",L68> TODAY()-30)

    And where the date in L68 was 28 September 2019 which is 30 days greater than the date in cell G68 (29 August 2019) L68 turned red, Great. but when I copied the formula and formatting to L69

    Date in L69 was 17 October 2019 which is 30 days greater the date in cell G69 (17 September 2019) L69 turned red when the actual date is only 3 October 2019. So it shouldn't turn red until 17 October 2019.

  5. #5
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Conditional formatting

    Rough guess: Your dates are not proper Excel dates but text.

  6. #6
    Registered User
    Join Date
    09-14-2015
    Location
    ipswich, england
    MS-Off Ver
    2010
    Posts
    31

    Re: Conditional formatting

    The first cell G68 and L68 are text entered dates but cells L68 and L69 has the following formula in it.

    =G68+30
    =G69+30

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

    Re: Conditional formatting

    I may help to avoid confusion if you could upload a sample worksheet that displays manually highlighted examples of all of the possible scenarios.
    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.

  8. #8
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Conditional formatting

    Quote Originally Posted by Novice999 View Post
    The first cell G68 and L68 are text entered dates but cells L68 and L69 has the following formula in it.
    I take it that's a typo.
    L68 cant have a manually entered value and a formula in the same cell.

    More importantly, what is a "text entered date"?
    The cell is either text or a number (date).
    Test using a blank cell with either ISTEXT() or ISNUMBER().

    Or better still, follow JeteMC's request and upload the file.

  9. #9
    Registered User
    Join Date
    09-14-2015
    Location
    ipswich, england
    MS-Off Ver
    2010
    Posts
    31

    Re: Conditional formatting

    I have attached a slimmed down version of the excel sheet. Hopefully it is clearer as to what I am trying to achieve. Thank you for your help on this.
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Conditional formatting

    Try this

    Select the range to highlight, e.g. L20:L23

    Conditional Formatting
    New Rule
    Use a formula to determine...
    4 formulas required, one for each colour

    =K20="PAID"
    format as green

    =AND(L20>0,L20-TODAY()>=0,L20-TODAY()<30)
    format as blue

    =AND(L20>0,L20-TODAY()>30,L20-TODAY()<60)
    format as yellow

    =AND(L20>0,L20-TODAY()>60)
    format as red

    Make sure the top formula is the green one

+ 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 based on another cells Conditional Formatting
    By chriskay in forum Excel General
    Replies: 4
    Last Post: 08-22-2019, 05:33 AM
  2. [SOLVED] Override conditional formatting (in general, without changing the conditional formatting)
    By Stormin' in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-21-2017, 07:15 AM
  3. Conditional Formatting Removing Previous Conditional Formatting?
    By CravingGod in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2016, 01:02 PM
  4. Replies: 6
    Last Post: 01-08-2016, 06:44 PM
  5. Opening xlsm files with conditional formatting opens with removed conditional formatting
    By Martijn.Steenbakker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2014, 05:38 AM
  6. Replies: 1
    Last Post: 09-20-2013, 06:23 PM
  7. Replies: 3
    Last Post: 05-15-2012, 04:13 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