+ Reply to Thread
Results 1 to 6 of 6

Conditional formatting with Multiple Criteria

  1. #1
    Registered User
    Join Date
    01-29-2008
    Posts
    68

    Conditional formatting with Multiple Criteria

    I'm trying to conditionally format a total row to turn or not turn a color based on the individual rows that make up that sum. I've attached a sample to go along with my explanation.

    My sheet is broke into 4 units with a total at the top. Each unit has a color that helps identify it. I would like for the total line to turn the color of the unit that makes up it's total only if that is the only unit part of the total otherwise I would like for it to stay non colored indicating that there are multiple units involved. It seems fairly easy to me how to get the total row to turn a color if a units row is greater than 0, but my mind block comes when I think of combining those with some kind of conditional formatting formula/step that leaves the cell non colored if there is no total or the total is made up of more than one unit.

    Conditional formatting example.xlsx

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Conditional formatting with Multiple Criteria

    HI Kgibson,

    Let me know if I am getting it correctly..
    Row 2 is orange in color (except blank cells) because it has only 100 in that row
    and same goes with column B as it has only 100 ?

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

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

    Re: Conditional formatting with Multiple Criteria

    You need 4 rules
    With range B1:H1 selected
    Rule #1: =AND(COUNT(B$2:B$5)=1,B$2<>"") format orange
    Rule #2: =AND(COUNT(B$2:B$5)=1,B$3<>"") format green
    and you can do #3 and #4 from that

  4. #4
    Registered User
    Join Date
    01-29-2008
    Posts
    68

    Re: Conditional formatting with Multiple Criteria

    The color in rows 2 through 5 is going to be the same color as it is in the same row of column A. It was really more for display purposes. The formatting I'm concerned about is for the total row which is 1. Say if row 2 is the only number in that column then I want the total to turn orange. If there is a number in 3 and 4 then I want it to stay non colored.


    Quote Originally Posted by dilipandey View Post
    HI Kgibson,

    Let me know if I am getting it correctly..
    Row 2 is orange in color (except blank cells) because it has only 100 in that row
    and same goes with column B as it has only 100 ?

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  5. #5
    Registered User
    Join Date
    01-29-2008
    Posts
    68

    Re: Conditional formatting with Multiple Criteria

    Looks like that did it. Thanks for the help.

    Quote Originally Posted by Cutter View Post
    You need 4 rules
    With range B1:H1 selected
    Rule #1: =AND(COUNT(B$2:B$5)=1,B$2<>"") format orange
    Rule #2: =AND(COUNT(B$2:B$5)=1,B$3<>"") format green
    and you can do #3 and #4 from that

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

    Re: Conditional formatting with Multiple Criteria

    You're welcome. Don't forget to mark your thread as SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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