+ Reply to Thread
Results 1 to 5 of 5

Conditional formatting based on a positive or negative variance.

  1. #1
    Forum Contributor
    Join Date
    05-19-2010
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2003
    Posts
    107

    Question Conditional formatting based on a positive or negative variance.

    Morning All.
    I currently have a column that shows the variance of actual volume to forecasted volume. The numbers change color based on the %. It is currently set up to shade green when less than or equal to 5%, yellow if between 5 and 10 % then red if over 10%. However, it also needs to shade if those are negative as well. So if it's between -5% and 5% it would be green if its between -5% to -10% and 5% to 10% it would be yellow and then anything over 10% and under -10% would need to be red. I have tried different variations and am unable to get it to work properly.
    Last edited by CJPHX; 07-08-2010 at 09:33 AM.

  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 based on a positive or negative variance.

    try wrapping the value in ABS() that will turn -5 into 5
    then I'm no so sure what are the formulas you're currently using?
    "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
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional formatting based on a positive or negative variance.

    Use Formula is option and then reference the cell in question within and ABS() function

    e.g. =ABS(A1)<5%
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: Conditional formatting based on a positive or negative variance.

    Hi,

    How about these, presuming actual and forecast are in columns A and B.


    =ABS((A1-B1)/A1)<=0.05
    =AND(ABS((A1-B1)/A1)>0.05,ABS((A1-B1)/A1)<=0.1)
    =ABS((A1-B1)/A1)>0.1
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  5. #5
    Forum Contributor
    Join Date
    05-19-2010
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2003
    Posts
    107

    Re: Conditional formatting based on a positive or negative variance.

    Thank you. Based on the way I had it set up the ABS() worked perfectly.

+ 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