+ Reply to Thread
Results 1 to 4 of 4

Conditional formatting rules, multiple conditions to check

  1. #1
    Registered User
    Join Date
    03-10-2022
    Location
    NZ
    MS-Off Ver
    365
    Posts
    2

    Conditional formatting rules, multiple conditions to check

    Hi - we have different types of milk that we test for acidity. High acidity is a problem, so I want conditional formatting to highlight these results. However, sheep milk naturally has higher acidity that other milks so has a different limit. Sheep milk limit is max 0.24, all other milks are max 0.18.

    Furthermore we get sheep milk from different customers. I have created a column that checks for "sheep" in the text of the product description and returns "Yes" if true. This future-proofs the system so if we get another sheep milk customer the formatting will still work.

    I have created a series of 4 conditional formatting rules that I want to apply in order:
    =J6>0.18, cell fill is orange
    =P6="No", no format set and stop if true
    =P6="Yes", change cell fill back to white (sheep results from 0.19-0.24 show as normal)
    =J6>0.24, change font to red bold.

    However the series of formulas seems to be only doing the first rule and not progressing. What am I doing wrong?
    Attached Images Attached Images
    Last edited by TomPeregrinNZ; 03-10-2022 at 05:49 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    686

    Re: Conditional formatting rules, multiple conditions to check

    Try a single rule with the formula:

    =J6>IF(P6="Yes",0.24,0.18)

    Edit - noticed you had different formats for sheep and non-sheep. In which case use two formulae:

    =AND(P6="Yes",J6>0.24)
    =AND(P6="No",J6>0.18)

    I've had trouble with conditional formatting apparently "stopping" when it is not supposed to, as well. But I think later rules don't override earlier ones if they apply to the same text. So I guess it colours orange if >0.18, and then otherwise has no format.
    Last edited by nick.williams; 03-10-2022 at 05:55 PM.

  3. #3
    Registered User
    Join Date
    03-10-2022
    Location
    NZ
    MS-Off Ver
    365
    Posts
    2

    Re: Conditional formatting rules, multiple conditions to check

    Awesome, that's perfect thankyou
    Attached Images Attached Images

  4. #4
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    686

    Re: Conditional formatting rules, multiple conditions to check

    Glad it helped.

    Personally the red text doesn't stand out to me like highlighting does, so I'd probably highlight it a different colour (or orange with red text), but obviously up to you.

+ 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. Multiple Conditional Formatting Rules
    By greggor36 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-20-2018, 08:27 AM
  2. [SOLVED] Using if and And together in conditional formatting multiple rules!
    By Katieloulouise in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 02-03-2015, 01:00 PM
  3. Conditional Formatting Rules from multiple columns based on conditions!!!
    By vijay4b7 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-08-2014, 05:22 PM
  4. Conditional Formatting, multiple rules
    By jsch08 in forum Excel General
    Replies: 1
    Last Post: 04-30-2013, 11:30 PM
  5. Conditional Formatting with multiple rules
    By carrod65 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-24-2012, 03:43 PM
  6. Conditional formatting multiple rules
    By candrew03 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-16-2011, 02:35 PM
  7. Conditional Formatting Multiple Rules
    By ems.payroll in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-07-2008, 12:31 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