+ Reply to Thread
Results 1 to 6 of 6

Conditional formatting with IF/AND/OR (array's?)

  1. #1
    Registered User
    Join Date
    09-02-2013
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2013
    Posts
    44

    Conditional formatting with IF/AND/OR (array's?)

    Hi!

    Once again I have a question I'am not able to solve.

    In my data set I want to format the cells that are below one standard deviation from the mean to "green", but NOT if the cell value is 0.
    And I also want to format the celles that are above one standard deviation from the mean to "yellow". So if the cells are within one standard dev. in either direction they can stay white, and also if they are zero.

    I attached an example of my workbook here. The bottom table I've used for trying out my formula for true/false. And I want the conditional formatting to apply for the midle table.

    PS! there will never be negative values.


    Thank you for any help
    Attached Files Attached Files

  2. #2
    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 with IF/AND/OR (array's?)

    =E41*(IF(NOT(ISBLANK(E41)),IF(E41=0,E41)))=E41 array entered why is that? i cant see what it is doing
    NOT(ISBLANK(E41)is the same as just E41<>""
    "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

  3. #3
    Registered User
    Join Date
    09-02-2013
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2013
    Posts
    44

    Re: Conditional formatting with IF/AND/OR (array's?)

    That didn't work :/

    If you put multiple IF's in a forumla I thought you have to use array, or is that not always true?

    I tried making one formula that formatted the cells if the cell value was zero, that worked. But when i added more rules, the rule which format the cells below one standard dev. from the mean green, also formatted the zeros to green. I tried mixing up the rule order in any different ways, but it didn't help :/
    I thought the upper most rule was the one who should override?

    Anyways, i figured if I put the "not zero" and the "below one standard dev." in the same formula I should be okey. The formula should look like this i think:
    "Statement is true only if cell value is below one standard dev. from the mean (this is given in the sheet, row 31), but only if the cell value is NOT zero.

    I have yet to figure out how to write this..

    I've tried something like this: =D41(IF(D41<D$31,IF(NOT(D41=0),D41))) but it doesn't work :/

  4. #4
    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 with IF/AND/OR (array's?)

    thats not true at all! you do not need to array enter IF
    i think you need something like
    =AND(D41<>"",D41<>0,D41<D$31)

  5. #5
    Registered User
    Join Date
    09-02-2013
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2013
    Posts
    44

    Re: Conditional formatting with IF/AND/OR (array's?)

    Okey, good to know thanks!

    That formula worked perfectly well, thank you so much!

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Conditional formatting with IF/AND/OR (array's?)

    FYI, although not relevant in this case, all CF are treated as array formula

+ 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. Conditional Formatting in an array while using edate
    By svalentine91 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-30-2013, 05:36 PM
  2. Conditional formatting with array formula?
    By tone640 in forum Excel General
    Replies: 9
    Last Post: 08-19-2011, 08:00 AM
  3. Conditional Formatting/Array Formula
    By SJT in forum Excel General
    Replies: 2
    Last Post: 07-24-2006, 05:15 PM
  4. Conditional formatting based upon array
    By RocketMan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-16-2006, 12:10 PM
  5. [SOLVED] Conditional Formatting for Array containing Text
    By MMM in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-02-2006, 11:35 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