+ Reply to Thread
Results 1 to 9 of 9

conditional formatting for running total

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    conditional formatting for running total

    Hello. How do I create a conditional formatting for a set of rows with %'s to turn red at the 50% mark? Spreadhsheet attached.
    Attached Files Attached Files

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,119

    Re: conditional formatting for running total

    50% of what ?

    you have 9.6%, 7.0 and 6.5% red I5, K7 & L6
    BUT not all the values that are the same as those in the rest of the spreadsheet
    for example I6 & I7

    would you provide a more detailed explanation please
    Last edited by etaf; 05-11-2015 at 04:31 PM.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  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
    53,048

    Re: conditional formatting for running total

    OK, here you go...
    =AND(SUM($C5:C5)>=0.5,SUM($B5:B5)<=0.5)
    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
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    Re: conditional formatting for running total

    @fdibbins. That works. Thanks. How does it work?

  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
    53,048

    Re: conditional formatting for running total

    This will color all cells where the sum of the row is >= 50%...
    =SUM($C5:C5)>=0.5

    I will work on CF for just that cell

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: conditional formatting for running total

    Select C5:O7

    Conditional Formatting, New Rule, Use Formula

    Formula: copy to clipboard
    =C5=MEDIAN($C5:$O5)


    Select the formatting of your choice.

    You can check this by copying the rows and sort in order and then using the MEDIAN function on each row. The same value should be chosen as is highlighted by the Conditional formatting.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  7. #7
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    Re: conditional formatting for running total

    @newdoverman. That works. Thanks. Why does it work? How does it know to do that for each row? Also, what if I wanted to change the %'s?

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: conditional formatting for running total

    MEDIAN finds the MIDDLE value of a range of values. If you sort the values in order, median will give the value in the middle of the list as close as can be calculated. If there is an odd number of values the middle value is one of the values in the range. If there is an even number of values the value returned is an average of the two values closest to the middle.

    You can change the values and the value that would be in the middle of the sorted list will be the value that MEDIAN returns.

  9. #9
    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
    53,048

    Re: conditional formatting for running total

    =AND(SUM($C5:C5)>=0.5,SUM($B5:B5)<=0.5)

    the 1st part tests a running total from column C, to see when it is >=0.5
    the 2nd part does the same, but is offset 1 column to the left - this is what stops the CF from keep on going

    Thanks for the rep
    Last edited by FDibbins; 05-11-2015 at 05:48 PM.

+ 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. Creating a conditional running total
    By GOQC in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-04-2014, 05:34 PM
  2. Conditional Formatting a Running Total
    By dwalinga in forum Excel General
    Replies: 0
    Last Post: 03-19-2013, 10:25 AM
  3. Running Total with Conditional Formatting and no Repeats
    By Gwen@YouWantWhat? in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-15-2012, 01:19 PM
  4. Conditional running total
    By Chandan_Excel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-02-2012, 04:46 AM
  5. Replies: 1
    Last Post: 05-09-2012, 04:32 PM

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