+ Reply to Thread
Results 1 to 7 of 7

Conditional formatting based on different functions

  1. #1
    Registered User
    Join Date
    08-16-2012
    Location
    Seattle
    MS-Off Ver
    Excel 2010
    Posts
    3

    Conditional formatting based on different functions

    [SOLVED]

    Hi all,

    I am trying to format a cell so that the fill color is white when zero, orange when less than a certain value, red when less than a smaller value, and red when it is 0.5 less than the value immediately to the left of it.

    I have been able to do all 4 things separately as well as join the first three of that list or the first and last of that list, but not all four conditions at once.

    Is this even possible?

    Thanks!
    Last edited by gknowels; 08-16-2012 at 06:54 PM. Reason: Solved

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,050

    Re: Conditional formatting based on different functions

    you need to apply different rules for each criteria, so for the 1st rule assuming B1...

    =B1=0......format white
    =B1<x......format orange
    =B1,xx......format red
    =B1-A1<0.5

    you can use "use formula" for all of the above, but you HAVE to use it for the last rule
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    08-16-2012
    Location
    Seattle
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Conditional formatting based on different functions

    So what do I do if there is a conflict between 2 conditions? Can I order them to in which conditions have priority?

    It is feasible and likely that the value could both be less than x (making it orange) and less than A1-0.5 (making it red)

  4. #4
    Registered User
    Join Date
    08-16-2012
    Location
    Washington, DC
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Conditional formatting based on different functions

    yes, you can have multiple conditions. There is a checkbox stop if true. if you want it to stop formatting after a condition is met you can use that. otherwise organize your conditional formats by moving them up and down in the list.

  5. #5
    Registered User
    Join Date
    08-16-2012
    Location
    Seattle
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Conditional formatting based on different functions

    Thanks guys! I got it worked out now! This is going to save me a lot of time and potential mistakes.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,050

    Re: Conditional formatting based on different functions

    you'r welcome. If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neet and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below)

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Conditional formatting based on different functions

    @ gknowels

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't properly marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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