+ Reply to Thread
Results 1 to 7 of 7

Conditional formatting entire row with graded color scale

  1. #1
    Registered User
    Join Date
    04-02-2010
    Location
    Sooner State
    MS-Off Ver
    Excel 2007
    Posts
    12

    Conditional formatting entire row with graded color scale

    Hello all,

    Attached is a spreadsheet with a graded color scale applied to the values in column D that have a value greater than or equal to 40. I have also filled the rows when the value in column D is greater than or equal to 40 with various colors depending on the value. How would I go about applying the graded color scale to the entire row instead of using several rules?

    Thanks
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,720

    Re: Conditional formatting entire row with graded color scale

    Open Conditional Formatting, Manage Rules, and you can update the rules for graded scale that refer to

    =$D$2:$D$21

    to be

    =$A$2:$D$21

    and remove the other rules.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    04-02-2010
    Location
    Sooner State
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Conditional formatting entire row with graded color scale

    Thanks for the reply.

    When I do that, the values in each cell are conditionally formatted based on the criteria provided. This is not what I want to accomplish. I want the colors in columns A-C to match the color in D for each row. I added the other rules to kind of show what I want to happen with each row. If there is no way to apply the color scale to rows I can get by with making up however many rules I need to.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,720

    Re: Conditional formatting entire row with graded color scale

    I'm sorry, my bad. I haven't done much with the gradient formatting introduced in Excel 2007 and misunderstood what was going on.

    I could not find a way to do this, because gradient formatting seems restricted to the values in the formatted cell, and cannot be done with formulas as can be done with plain vanilla formatting. As far as I can tell.

    I tried to develop a VBA solution but have found that Interior.Color is the base color of the cell and does not change when gradient conditional formatting changes the fill color.

    So...I'm sorry but I ran out of ideas.

  5. #5
    Registered User
    Join Date
    04-02-2010
    Location
    Sooner State
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Conditional formatting entire row with graded color scale

    Thanks for trying. I messed with it for so long today, but could not come up with anything either.

  6. #6
    Registered User
    Join Date
    10-18-2016
    Location
    Paris, France
    MS-Off Ver
    2010
    Posts
    2

    Re: Conditional formatting entire row with graded color scale

    Hi,

    This thread is super old but I've been trying to accomplish that very thing all day today and now that I have a solution I'm just too excited not to share it. It's 7 lines of VBA code and the elegance makes me weep.

    Disclaimer: This works for Excel 2010, so no guarantees for other versions.
    Please Login or Register  to view this content.
    This code looks at the color actually displayed in each conditionally formatted cell and applies that to every cell to its left. In this case, the gradient was applied to column 6 and each column has headers (hence row starts at 2).
    Make sure to adapt the numbers to your spreadsheet and you should be good to go.

    Let us rejoice! Hurrah! Hurrah!
    Last edited by Inasmuch; 10-19-2016 at 03:44 AM. Reason: Changed code indentation

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,720

    Re: Conditional formatting entire row with graded color scale

    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer

+ 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