+ Reply to Thread
Results 1 to 16 of 16

excel 2010 need color result for my formula

  1. #1
    Registered User
    Join Date
    06-23-2012
    Location
    Mass
    MS-Off Ver
    Excel 2010
    Posts
    7

    excel 2010 need color result for my formula

    I have the following formula in my excell spreadsheet and need to adjust the color of the result Green for TRUE and Red for FALSE and maybe i'm missing somthing but i can't get anything i've tried to work but know it can be done...HELP!!!!

    =IF(K2>L2,K2-L2,L2-K2)
    Last edited by cfour; 06-23-2012 at 01:16 PM.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: excel 2010 need color result for my formula

    Hello & Welcome to the Forum,

    Can you explain a little more about what you want to achieve?

    With your current formula, K2 = 33 / L2 = 11 / result 22

    If you reverse it, K2 = 11 / L2 = 33 / result 22
    HTH
    Regards, Jeff

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

    Re: excel 2010 need color result for my formula

    Hi cfour,

    Welcome to the forum.

    apply below formula in conditional formatting and choose the format color as Green

    K2>L2

    apply below formula in conditional formatting and choose the format color as Red

    K2<L2


    Upload the sample workbook in case of any issues.. thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  4. #4
    Registered User
    Join Date
    06-23-2012
    Location
    Mass
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: excel 2010 need color result for my formula

    Here is what I have

    cell K2 cell L2 cell M2
    11 33
    Please Login or Register  to view this content.
    result is false (22)

    I need the result to show on my spreadsheet in specific colors (when the answer is true the result needs to be GREEN and when the answer is false the result needs to be RED)

  5. #5
    Registered User
    Join Date
    06-23-2012
    Location
    Mass
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: excel 2010 need color result for my formula

    I tried that and it didn't work...not sure why

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: excel 2010 need color result for my formula

    Are you wanting to perform a color change on a number or on true/false?

    The formula you have now returns a number, not true of false.

    Please help me see what I am missing?

  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: excel 2010 need color result for my formula

    dilipandey is correct
    =K2>L2 green
    =K2<=L2 red
    are the conditions is that what you tried?
    "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

  8. #8
    Registered User
    Join Date
    06-23-2012
    Location
    Mass
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: excel 2010 need color result for my formula

    I might be making this mor complicated than necessary.....

    the formula =IF answers a TRUE and FALSE in my case yes the result shown in the sell is a number maybe that is where i am going all wrong....going to try what dilipandey suggested again...will update

  9. #9
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: excel 2010 need color result for my formula

    Thank you dilipandey and Martin,

    I was getting wrapped around the fact the formula itself was not returning true/false, but a value. Thanks for the help.

  10. #10
    Registered User
    Join Date
    06-23-2012
    Location
    Mass
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: excel 2010 need color result for my formula

    just did it again under conditional formatting and not getting any change...I attached a sample and you will see i have added the conditional formula to the cell

    sample.xlsx
    Attached Files Attached Files

  11. #11
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: excel 2010 need color result for my formula

    In your sample you might want to reference the correct cells...

    =A2>B2

    and also you don't need "" around the formula.

    Enter in just like you see it above.

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

    Re: excel 2010 need color result for my formula

    you have to actually refer to the cells you mean ! see attached
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    06-23-2012
    Location
    Mass
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: excel 2010 need color result for my formula

    I did I just attached a sample and forgot to make the change....Jeff it keeps adding the " to my formula not sure why...I have it up and it is as you entered above and when i open it again to see it it adds the "?????

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

    Re: excel 2010 need color result for my formula

    look in my upload ,use manage rule/edit rule to see what is in there

  15. #15
    Registered User
    Join Date
    06-23-2012
    Location
    Mass
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: excel 2010 need color result for my formula

    I just deleted the " from the formula and it stayed the way i entered....not sure why it is adding the " but it works now so thanks

  16. #16
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: excel 2010 need color result for my formula

    When you entered the formula the first time and got this >> ="A2>B2"

    most likely it is because you entered A2>B2 without the = sign.

    If you don't put the = sign then the formula gets wrapped with ""

+ 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