+ Reply to Thread
Results 1 to 5 of 5

Combining Conditional Formats

Hybrid View

  1. #1
    Registered User
    Join Date
    04-26-2013
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2007
    Posts
    18

    Combining Conditional Formats

    Hi

    I have several lists of numbers ranging in value from -20 to +20. I currently have six conditional formats setup to colour the text based on its value.

    ie:

    <= -14.5 (stop if true. text blue)
    <= -9.5 (stop if true. text red)
    <= -4.5 (stop if true. text orange)
    >= 14.5 (stop if true. text blue)
    >= 9.5 (stop if true. text red)
    >= 4.5 (stop if true. text orange)

    With having six conditional formats I find the workbook is not fully compatible with earlier versions. My question is can I combine these statements in a formula to give me three conditional formats?

    Something like: <= -14.5 OR >= 14.5 (stop if true. text blue)

    I've tried and failed.

    Thanks
    Andrew

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Combining Conditional Formats

    hi Andrew, welcome to the forum. i forgot if the earlier versions can prioritise the rules. you can try putting in this order.
    select the range you want to apply to (say B1:B10)
    in Excel 2007 & above, go to Home -> Conditional Formatting -> New Rule -> Use a formula to determine which cells to format -> Format values where this formula is true:
    in Excel 2003, go to Format -> Conditional Formatting -> Formula is:
    =ABS(B1)>=14.5
    =ABS(B1)>=9.5
    =ABS(B1)>=4.5

    if it fails, then:
    =ABS(B1)>=14.5
    =AND(ABS(B1)>=9.5,ABS(B1)<14.5)
    =AND(ABS(B1)>=4.5,ABS(B1)<9.5)

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: Combining Conditional Formats

    Or is a function, so you need to treat it like one. try =OR(A2<=-14.5,A2>=14.5)
    Frob first, tweak later

  4. #4
    Registered User
    Join Date
    04-26-2013
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Combining Conditional Formats

    Thanks benishiryo I see what you mean but I was looking for something similar to what Neil suggested.

  5. #5
    Registered User
    Join Date
    04-26-2013
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Combining Conditional Formats

    Thanks Neil. I had tried OR but I was trying to include the range of cells in the formula rather than giving it one cell ref (as you did) and letting Excel do the work.

    Sometimes I can’t see the forest for the trees.

+ 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