+ Reply to Thread
Results 1 to 5 of 5

Conditional Formatting based on formulas

  1. #1
    Registered User
    Join Date
    02-15-2011
    Location
    Paris
    MS-Off Ver
    Excel 2007
    Posts
    3

    Conditional Formatting based on formulas

    Hi All,

    I have been using excel for a while now but recently started really exploring the true potential of it. I am trying to prepare a planning spreadsheet but facing an issue. I want to do a sum of all the cells in a row and compare that with the value in a single cell. If both are equal then display a certain colour else display a different colour. I am able to do this for a single row but is there a formula which does this for multiple rows together.

    Example:
    If K15 = sum of N15:AA15 fill the cell K15 with green colour else red
    If K16 = sum of N16:AA16 fill the cell K16 with green colour else red
    If K17 = sum of N17:AA17 fill the cell K17 with green colour else red

    cells K15, 16, 17 etc...should not have any colour if no value is entered
    btw, I use excel 2007 if that makes any difference.

    Thanks in advance!

    Cheers
    Last edited by hunkietechie; 02-15-2011 at 11:21 AM.

  2. #2
    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 formulas

    Select cell K15:K17 and then go to Home|Conditional Formatting, Manage Rules.

    Select New Rule and then select Use formula to determine which cells to format and then select Cell Value >> Equal to >> enter: =K15=SUM(N15:AA15)

    click Format and choose Green from Fill tab.
    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.

  3. #3
    Registered User
    Join Date
    02-15-2011
    Location
    Paris
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Conditional Formatting based on formulas

    Thanks for the quick reply but it formats only cell K15 even if I select K15:K17 before clicking on conditional formatting. If I enter values in rows 16 and 17, nothing happens in K16 and K17 respectively!

  4. #4
    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 formulas

    It worked in my test...

    The SUM() formulas are relative to the cell selections.

    Reinvoke conditional formatting on those cells and check that the applies to box has: =$K$15:$K$17 in it.

    Also look at the formula again and make sure there are no quotes around it... and that you have no $ signs in them...

  5. #5
    Registered User
    Join Date
    02-15-2011
    Location
    Paris
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Conditional Formatting based on formulas

    Thanks again...the $ sign was the culprit!

+ 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