+ Reply to Thread
Results 1 to 6 of 6

Change Color Of Text First Time It Appears In A Range

  1. #1
    Forum Contributor
    Join Date
    01-30-2011
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    102

    Change Color Of Text First Time It Appears In A Range

    There will be 18 rows, and 18 columns. I would like to be able to change the color of the text the first time it appears in a particular range to red.

    Example:

    A A A B B A C A C

    The first A , the first B, and the first instance of C would appear red.

    I'm not going to bother asking if this is possible. I'm sure if I asked if I could get some code to launch the space shuttle from my desktop, I would have the code in a couple of hours. This board is amazing....

    Thanks in advance....

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Change Color Of Text First Time It Appears In A Range

    range = what? row 1? column 1? any where in the 18?X18 grid?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Contributor
    Join Date
    01-30-2011
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    102

    Re: Change Color Of Text First Time It Appears In A Range

    I mis-spoke when I said 18 columns. There will be 7 columns, one for each day of the week.

    I would be looking across rows for the first instance of text. The first row starts at B2 and ending with the last row at B19

    And if it matters, which it probably does, there will be instances of multiple words in each cell, so I need to be able to isolate the first time each word pops up across the row, even if it's mixed in with other words....so, it could look like:

    B2 - A
    C2 - A B
    D2 - A B
    E2 - A
    F2 - C
    G2 - B
    H2 - A D

    Colored red would be A (B2), B (C2), C (F2), D (H2)

    The grid would be B2:H19

    Thanks!
    Last edited by ZooTV92; 10-23-2011 at 05:54 AM.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Change Color Of Text First Time It Appears In A Range

    cant see how it can be done with mixed characters/words in the same cell maybe possible with vba but will it simply be single characters as you have suggested? you cant use functions to format individual characters in a string
    Last edited by martindwilson; 10-23-2011 at 07:26 AM.

  5. #5
    Forum Contributor
    Join Date
    01-30-2011
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    102

    Re: Change Color Of Text First Time It Appears In A Range

    Thank you.

    Then let me revise this since I really need this to work in some form. Would it work if I "simply" had one word in each row?

    B2 - A
    C2 - B
    D2 - B
    E2 - A
    F2 - C
    G2 - B
    H2 - D

    colored red:
    A (B2), B (C2), C (F2), D (H2)

    There will be words, not letters. I am using letters for simplicity. Thanks again for taking the time to respond.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Change Color Of Text First Time It Appears In A Range

    this should work
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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