+ Reply to Thread
Results 1 to 6 of 6

Rows shading based on cell

  1. #1
    Registered User
    Join Date
    11-02-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    2

    Rows shading based on cell

    Hi,

    I have a worksheet :

    Server1 65 7 11
    Server1 5 4 81
    Server2 0 0
    Server2 60 33 55
    Server2 0 0
    Server2 450 59 13
    Server2 100 100 100
    Server2 800 297 37
    Server3 100 98 98
    Server3 65 7 11
    Server3 5 4 81
    Server3 0 0


    I would like the rows to be shaded the same color depending on what is in cell 1, So all server1 would be same color shading, and different shade for server2 and server3 would be same color as server 1, so alternate shadings to make it easier to read.

    The file is generated from a script, so could be up to 40 different values in row1, also number of occurrences of value would differ as well.

    Not sure where to start with this as at all, so any help would be greatly appreciated.

    Thanks in advance

  2. #2
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Rows shading based on cell

    Hi
    Can you distinguish 40 different colors? I suppose you will have advantages to use filters.
    To use the other approach you must use VBA

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Rows shading based on cell

    Hi,

    One way would be to create a table of server names and alongside in a second column alternate the numbers 1 & 2. Name this two column range say "tbl_servers".

    Then use two conditional format rules. Assuming your table of data starts in A1 then the first CF would be

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and the second CF
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    define a different colour for each and apply to the whole table, e.g. A1:ARnn

    If you want blank cells not to be coloured then use the following instead

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    ditto for the other rule
    Last edited by Richard Buttrey; 11-02-2016 at 09:40 AM.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Rows shading based on cell

    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    11-02-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    2

    Re: Rows shading based on cell

    Excellent, many thanks for your suggestions, i got it to work by following these instructions.

    http://www.atlaspm.com/toms-tutorial...ting-by-group/

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Rows shading based on cell

    Good deal. Thanks for the feedback!

+ 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. [SOLVED] Conditional Formatting Shading Rows Based On A Single Cell
    By Kanook22 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-17-2012, 12:09 PM
  2. Shading cells based on entries across rows
    By Finalfrontier1976 in forum Excel General
    Replies: 1
    Last Post: 12-13-2011, 09:26 AM
  3. Shading Rows Based on Groups
    By AriX3 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-18-2011, 04:43 PM
  4. Shading cells based on a value in another cell
    By lucky_girl in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-27-2009, 11:11 AM
  5. [SOLVED] Conditional Cell Shading (based on the shading of other cells)
    By Tubby in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-20-2006, 05:10 PM
  6. Shading cells in a row based on another cell
    By matpj in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-18-2006, 05:11 AM
  7. Column based cell shading
    By rbmcc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-06-2006, 01:27 PM
  8. Clear cell based on shading
    By demon42 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-21-2005, 08:05 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