+ Reply to Thread
Results 1 to 5 of 5

Colour cells when value changes

  1. #1
    Registered User
    Join Date
    08-01-2012
    Location
    United Kingdom
    MS-Off Ver
    Office 2010
    Posts
    71

    Colour cells when value changes

    I have a list of employees in Excel with data (attached), how can I get VBA to get the data in Sheet1 to be presented as it is in Sheet2?

    The first row should be coloured in, then all rows for that person should be coloured in the same, when it goes to the next person it should be blank.


    Any ideas?

    Edit: the data is already sorted into alphabetical order before it is put onto this sheet.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Colour cells when value changes

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-01-2012
    Location
    United Kingdom
    MS-Off Ver
    Office 2010
    Posts
    71

    Re: Colour cells when value changes

    Quote Originally Posted by JOHN H. DAVIS View Post
    Maybe:

    Please Login or Register  to view this content.
    Thanks, but how would I change this so it can run in a normal sub? There are 6 sheets like this, which I would like to keep hidden if possible (although activating them one at a time could work).

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Colour cells when value changes

    Maybe:

    Please Login or Register  to view this content.

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Colour cells when value changes

    Please try this to see if this is what you are trying to achieve.
    Please Login or Register  to view this content.
    Refer to the attached and click the button 'Click Here" to run the code in order to get the desired output.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

+ 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] Search cells based on student name, cell background colour and return a tally for colour
    By drof_06 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-26-2016, 04:31 AM
  2. Replies: 1
    Last Post: 12-23-2015, 02:08 PM
  3. Replies: 3
    Last Post: 02-13-2014, 06:31 AM
  4. Auto copy cells including a cells Coloured background (colour fill)
    By rick.parry in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-06-2013, 04:51 AM
  5. Change colour of cells based on another cell's colour (Not value)
    By LTrain89 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-25-2013, 08:44 PM
  6. Macro that clears contents of all cells of certain colour (colour 35) in all sheets
    By Hanskubansku in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-25-2012, 07:33 AM
  7. Changing a cell's colour basing on other cells' colour
    By rhua5436 in forum Excel General
    Replies: 11
    Last Post: 09-23-2010, 05:49 AM

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