+ Reply to Thread
Results 1 to 4 of 4

Colouring variable text within a cell / string, and merging a variable number of cells

  1. #1
    Registered User
    Join Date
    11-26-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    2

    Colouring variable text within a cell / string, and merging a variable number of cells

    Hi

    I've spent far too many hours at work today trying to figure out how to do a couple things and am hoping someone can help. Basically I'm dealing with registers and for example, one entry (with a particular reference number) may have several actions associated with it (which appear in different rows) and each action would have a due date next to it. What I want to do is to be able to put all the actions in one cell, and colour the actions that are complete as grey, and the ones that are late in red, and I'm really struggling.

    Here is what the raw data would look like:

    ID Action Description Status Due Date
    3001 Description 1 Open 10/03/15
    3001 Description 2 Closed 01/01/15
    3001 Description 3 Open 01/02/15
    3002 Description 4 Closed 01/12/14
    3002 Description 5 Open 15/11/14

    And what I want the output to look like is:

    ID Action Description Status / Due Date
    3001 1. Description 1
    2. Description 2
    3. Description 3
    1. Open, Due 10/03/15
    2. Closed, Complete 01/01/15
    3. Overdue, 01/02/15
    3002 1. Description 4
    2. Description 5
    1. Closed, Complete 01/01/15
    2. Overdue, 15/11/14

    The number of different descriptions per ID would vary from none to many, the length of each description varies significantly, and there needs to be an unlimited number of IDs that could be present in the register (i.e. I may have 200 different IDs, each of them with numerous descriptions of actions, and each of those with a due date that is either not there, is late, or is in the future, so would need to be colour-coded).

    Joining the Status and Due date columns are not a problem, but I'm struggling with joining the different rows (of the same ID) and then colour-coding the necessary text within those cells.

    Any thoughts would be appreciated as I'm truly stuck.

    Cheers

    Steve
    Last edited by Steve M.; 02-16-2015 at 06:17 PM.

  2. #2
    Registered User
    Join Date
    11-26-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Colouring variable text within a cell / string, and merging a variable number of cells

    Slight update - I've now got the merging the cells all sorted so it's just the changing the colours within the cells I'm now missing.

  3. #3
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Colouring variable text within a cell / string, and merging a variable number of cells

    Hi Steve,

    Try the following Macro which is also implemented in the attached file.

    Lewis

    Please Login or Register  to view this content.

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Colouring variable text within a cell / string, and merging a variable number of cells

    Try the attached
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by jindon; 02-18-2015 at 01:34 AM.

+ 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] Sum individual day's data but merging variable number of cells problem.
    By skyping in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-26-2015, 04:17 PM
  2. [SOLVED] Calculate average of variable number of cells variable number of times
    By WeirnetherlandsBart in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-06-2014, 10:11 AM
  3. [SOLVED] Need to use a text string from another cell as a variable range in another equation.
    By herbie226 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-05-2014, 06:17 PM
  4. Replies: 4
    Last Post: 07-12-2013, 12:14 PM
  5. Merging the correct number of cell rows to fit a string of wrapped text
    By iterature in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-28-2007, 02:15 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