+ Reply to Thread
Results 1 to 3 of 3

Conditional format with IF AND formula

  1. #1
    Registered User
    Join Date
    09-21-2006
    Posts
    28

    Conditional format with IF AND formula

    Hello, I've been playing with multiple conditional formats based on formulas and I have one set that I cannot figure out.

    I have this conditional format formula to shade a cell orange if the follow is true. B3 and columns J and K are all dates.

    =AND(J9-$B$3>=0,J9-$B$3<=15)

    It works, except I need to to only format the cell if K9="" and I can't figure out how to add an IF to the above. Can you let me know if this is possible and how?

    If K9<>"", I need it to not do any formatting and apply other rules:
    =IF(K9<>"",(J9-K9))<0 Red
    =IF(K9<>"",(J9-K9))>=0 Green

    Thanks for your help!

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Conditional format with IF AND formula

    You don't need IF, you can add another condition to AND, i.e.

    =AND(J9-$B$3>=0,J9-$B$3<=15,K9="")

    then for your other two conditions you can use AND again

    =AND(K9<>"",K9>J9)

    =AND(K9<>"",K9<=J9)

  3. #3
    Registered User
    Join Date
    09-21-2006
    Posts
    28

    Re: Conditional format with IF AND formula

    Worked like a charm and that was way too easy. I read earlier about not needing IF, but it didn't sink in. Thank you for taking the time to help!

+ 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