+ Reply to Thread
Results 1 to 8 of 8

Excel 2007 : Conditional Formatting rows based on a cell

  1. #1
    Registered User
    Join Date
    07-07-2009
    Location
    Guildford
    MS-Off Ver
    Excel 2007
    Posts
    8

    Conditional Formatting rows based on a cell

    Hi all,

    I just wanted to know if it was possible to conditional format and entire row based on 1 of it's cells. e.g. I have a table with 3 columns (total, positive, negative). I want to format the rows of this column based on the overall percentages in the Total Column (i.e. if the total column is greater than 5% of the overall Total then the row should have no fill). So row A has a total at 10, positive 4, negative 6. Row A should then all be filled.

    Hope that a) makes sense and b) can be done. If it is posible how do I do it??

    Thanks
    Last edited by NBVC; 07-07-2009 at 08:55 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 rows based on a cell

    Select your entire range and then go to the Home tab and click Conditional Formatting from the Styles section.

    Select New Rule

    Then select Use a Formula to determine which cells to format

    Enter formula:

    =$A1>0.05*($B1+$C1)

    where A1 is your total column in top most row of your selection and B1 and C1 are your positive and negative values in corresponding row.

    Note: I assume you actually have a negative in column C.

    Click Format and choose colours...
    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
    07-07-2009
    Location
    Guildford
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Conditional Formatting rows based on a cell

    thanks Mate... That was great.... although a bit annoying having to re-enter the formula in for every row..... is there a faster way of copying the conditional formatting down the entire table without having to change the row numbers manually?

  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 rows based on a cell

    If you selected the "Entire" range as instructed... then followed the steps only replacing $A1, $B1 and $C1 with the references to the top most row in your selection, then it will apply to all rows in your selection (the row values will automatically adjust).

    Alternatively, select the range you already apply the formatting to... then select the remaining rows in your database and go to Edit|Paste Special and select Formats.. then click Ok.

  5. #5
    Registered User
    Join Date
    07-07-2009
    Location
    Guildford
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Conditional Formatting rows based on a cell

    Awesome!!!! Thanks Again... Possibly the best and fastest answers on ANY MS help forum.... Man... if only everyone was as good as this :P

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional Formatting rows based on a cell

    Quote Originally Posted by Sashabaz View Post
    ... Possibly the best and fastest answers on ANY MS help forum....
    Not Possibly.. but THE BEST!

    Please remember to mark your thread as [Solved] See FAQ in my sig.

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Conditional Formatting rows based on a cell

    Quote Originally Posted by Sashabaz View Post
    Awesome!!!! Thanks Again... Possibly the best and fastest answers on ANY MS help forum.... Man... if only everyone was as good as this :P
    Old adage..."If everyone were special, then no one would be."

    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  8. #8
    Registered User
    Join Date
    07-07-2009
    Location
    Guildford
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Conditional Formatting rows based on a cell

    hahaha... ok I conceed... the BEST it is..... AND your a child Genius by the looks of it!! Barely able to walk, yet totally able to solve Excel issues.....

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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