+ Reply to Thread
Results 1 to 7 of 7

Change a cell color per greater than/less than formula

  1. #1
    Registered User
    Join Date
    08-30-2013
    Location
    Pittsburgh, USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Change a cell color per greater than/less than formula

    My formula is =IF((C2+E2)>D2,"WIN","LOSE") Could some one please tell me the new formula if I wanted the cells with "WIN" to be green, and the 'LOSE' cells to be yellow. Excel 2010

    Thanks in advance

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Help to change a cell color per greater than/less than formula

    Hi,

    You would need this to be done using Conditional Formatting, as you can't change cell colour using a cell formula.

    In the conditional formatting, select "New Rule", then "Format only cells that contain". Choose "Cell Value", "equal to", "WIN" (without the quotation marks).

    Repeat this for "LOSE".

    Hope this helps

  3. #3
    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,933

    Re: Help to change a cell color per greater than/less than formula

    Hi and welcome to the forum

    follow ajryan's instructions to apply the Conditional Formatting, but they left out the actual formula...

    for the 1st rule (equal to)...
    =C2+E2>D2
    for the 2nd rule (Lose)
    =C2+E2<=D2

    Highlight the entire range you want the CF to apply to, before you go into the CF window
    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

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Help to change a cell color per greater than/less than formula

    @FDibbins: you don't need a formula if you choose "Format only cells that contain", you only need to provide a cell value, which is either "WIN" or "LOSE"

  5. #5
    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,933

    Re: Help to change a cell color per greater than/less than formula

    aahhh yes, good point aj, I should have read your post properly

  6. #6
    Registered User
    Join Date
    08-30-2013
    Location
    Pittsburgh, USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Help to change a cell color per greater than/less than formula

    Thank you guys!! Problem solved!!!

  7. #7
    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,933

    Re: Change a cell color per greater than/less than formula

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. Change Cell color based on greater than, less than formula
    By Directorboy in forum Excel General
    Replies: 2
    Last Post: 03-07-2013, 11:18 AM
  2. [SOLVED] count the length of each cell in a row and change color if greater than 24
    By mshirley15 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-09-2012, 04:21 PM
  3. how to change the color of a cell if the value of it is greater than another cell
    By suhailtholakkal in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-24-2011, 05:30 AM
  4. Replies: 3
    Last Post: 10-22-2009, 07:20 AM
  5. Change Test Color If Value is Greater Than Another
    By BluTalon in forum Excel General
    Replies: 8
    Last Post: 11-07-2008, 10:24 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