+ Reply to Thread
Results 1 to 2 of 2

Conditional Formatting with Formulas

  1. #1
    Forum Contributor
    Join Date
    03-31-2009
    Location
    Halstead
    MS-Off Ver
    Excel 365
    Posts
    240

    Conditional Formatting with Formulas

    I am using Conditional Formatting with a Formula of =AND(B5-TODAY()>=0,B5-TODAY()<=5) this tell me if an item is due within 5 days and highlights the cell in red, I also want to be able to highlight the cell if it is overdue, does anyone now how I can do this?

    Also At the moment I have a formula in Cell D5 of =IF(ISNUMBER(F5),"Paid","Due") which changes to paid or due if an amount is entered in to F5, does anyone now how it change be done to have Paid, Due and Overdue in this formula?

    Shazz

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,822

    Lightbulb Re: Conditional Formatting with Formulas

    Quote Originally Posted by Shazz View Post
    I am using Conditional Formatting with a Formula of =AND(B5-TODAY()>=0,B5-TODAY()<=5) this tell me if an item is due within 5 days and highlights the cell in red, I also want to be able to highlight the cell if it is overdue, does anyone now how I can do this?
    If you mean that you want the same formatting for all these conditions, then you can just update your existing condition to:

    =OR(AND(B5-TODAY()>=0,B5-TODAY()<=5),B5<TODAY())

    Edit: Actually this is logically equivalent to:

    =B5<=TODAY()+5

    If you want the overdue payment to get a different format, Excel allows multiple conditions/formats in the same cell. Leave your original condition alone and add another condition

    =B5<TODAY()

    with corresponding formatting.
    Also At the moment I have a formula in Cell D5 of =IF(ISNUMBER(F5),"Paid","Due") which changes to paid or due if an amount is entered in to F5, does anyone now how it change be done to have Paid, Due and Overdue in this formula?
    The following formula does what you describe, but it seems that you also need to include the case where the payment is not yet due:

    =IF(ISNUMBER(F5),"Paid",IF(B5<TODAY(),"Overdue","Due"))

    This formula, and the one you started with, will both say Due even if the payment is not yet due.
    Last edited by 6StringJazzer; 03-04-2010 at 04:34 PM.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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