Closed Thread
Results 1 to 2 of 2

Color bunch of rows with the same key value

  1. #1
    Registered User
    Join Date
    09-16-2018
    Location
    Israel
    MS-Off Ver
    2013
    Posts
    15

    Thumbs up Color bunch of rows with the same key value

    Hello,

    If a bunch of rows contain a certain key value, I would like to color all the rows in blue. And then if a bunch of rows contain a certain key value, I would like to color all the rows in white. And so on, blue-white-blue-white untill the end of the table.
    What is the best automatic way to do so? (Office 2010).

    For instance, in the following example, my key value is "COUNTRY".
    If the cell above contains the same country-value, color the whole row in the same color as above.
    Else, color the whole row in different color.


    ID | NAME | AGE | COUNTRY
    105 | BOBO | 22 | USA >> Whole row is WHITE
    106 | MOMO | 52 | USA >> Whole row is WHITE
    107 | LOLO | 63 | FRANCE >> Whole row is BLUE
    108 | POPO | 21 | INDIA >> Whole row is WHITE
    109 | KOKO | 12 | ITALY >> Whole row is BLUE
    110 | JOJO | 58 | ITALY >> Whole row is BLUE
    111 | TOTO | 47 | ITALY >> Whole row is BLUE
    112 | FOFO | 36 | MEXICO >> Whole row is WHITE
    113 | DODO | 21 | MEXICO >> Whole row is WHITE
    114 | ZOZO | 52 | THILAND >> Whole row is BLUE
    115 | SOSO | 19 | GERMANY >> Whole row is WHITE

  2. #2
    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
    52,933

    Re: Color bunch of rows with the same key value

    Hi, welcome to the forum

    Welcome to the Forum, unfortunately this is a duplicate post and as such will now be closed, you may continue in your other thread.

    Thread Closed.

    https://www.excelforum.com/excel-cha...key-value.html
    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

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 24
    Last Post: 04-12-2017, 03:39 AM
  2. Replies: 3
    Last Post: 10-09-2014, 02:42 PM
  3. Looking for a faster way to change the background color of a bunch of cells
    By Ed_Collins in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-17-2014, 04:58 AM
  4. Looking Up a Value From a Bunch of Data
    By Howdoesitwork in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-17-2014, 05:23 AM
  5. [SOLVED] Merging a bunch of sheets
    By Sweepin in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-01-2013, 01:28 AM
  6. [SOLVED] Macro for transposing bunch of 8 cells in a column into separate rows
    By theotherguy316 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-23-2012, 02:43 PM
  7. macro: changing color of coloumn header based on rows color
    By rajaid in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-22-2009, 06:43 PM

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