+ Reply to Thread
Results 1 to 8 of 8

Conditional formatting if a range of cells contain 1

  1. #1
    Forum Contributor
    Join Date
    10-16-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    257

    Conditional formatting if a range of cells contain 1

    Hi

    How would I go about conditional formatting range P1 to be GREEN if A1 B1 C1 and N4 = 1 else it would display RED

    it has been a while since i've used a formula for conditional formatting

    Many Thanks

  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
    52,926

    Re: Conditional formatting if a range of cells contain 1

    1. highlight the range you want to apply the conditional formatting to
    2. on the home tab, styles, select CF
    3. select new rule, select use formula
    4. enter =OR(A1=1,B1=1,C1=1,N4=1) format GREEN

    For the RED...
    3. select new rule, select use formula
    4. enter =AND(A1<>1,B1<>1,C1<>1,N4<>1) format RED
    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
    Forum Contributor
    Join Date
    10-16-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    257

    Re: Conditional formatting if a range of cells contain 1

    Ah I would never have thought to put the OR and AND in there!!!
    Thanks a bunch, I will try this tomorrow, I need my bed!!!!

    Thanks again.

  4. #4
    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
    52,926

    Re: Conditional formatting if a range of cells contain 1

    Happy to help, let me know how you make out

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conditional formatting if a range of cells contain 1

    you could probably just colour red fill rather than use
    =AND(A1<>1,B1<>1,C1<>1,N4<>1) condition
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  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
    52,926

    Re: Conditional formatting if a range of cells contain 1

    yes, depending on what else they want, that might be a better option, Martin

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conditional formatting if a range of cells contain 1

    then again it might be quicker to use the cf

  8. #8
    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
    52,926

    Re: Conditional formatting if a range of cells contain 1

    Do I detect another IF() inthere, Martin?

+ 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. [SOLVED] Use conditional formatting on a range of cells
    By musik7 in forum Excel General
    Replies: 5
    Last Post: 01-24-2013, 12:00 PM
  2. Conditional Formatting a range of cells
    By Terghan in forum Excel General
    Replies: 10
    Last Post: 07-11-2012, 02:00 PM
  3. Excel 2007 : Conditional Formatting to Range of Cells
    By lovesexcel in forum Excel General
    Replies: 3
    Last Post: 04-21-2011, 03:43 PM
  4. Conditional formatting a range of cells
    By Brandy in forum Excel General
    Replies: 5
    Last Post: 11-26-2009, 04:00 PM
  5. Conditional formatting - range of cells
    By kroz in forum Excel General
    Replies: 6
    Last Post: 03-09-2009, 07:58 AM

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