+ Reply to Thread
Results 1 to 2 of 2

Extract text based on font colour

  1. #1
    Registered User
    Join Date
    08-06-2021
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    1

    Extract text based on font colour

    I currently have a column with a few hundred rows. Each cell has text with three main standard colours (yellow, red and blue). Occasionally i have a cell with 'N/A' in automatic font.

    I'm trying to extract the text based on the font colour to a new column.

    A1

    5.1 Debris in area
    7.4 Gap too large
    7.5 Not adequately sealed

    Misc. -wear and tear.
    Misc. - scratches


    So the text above would be split into another three columns based on the three font colours. I have found the following macro from a different site to extract the red text and it works perfectly. However i'm not too sure how to repeat for Blue and Orange text.

    Please Login or Register  to view this content.
    Many thanks
    Last edited by davesexcel; 08-07-2021 at 10:38 AM.

  2. #2
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,220

    Re: Extract text based on font colour

    You can use the GetColorText function, slightly modifying it:
    Please Login or Register  to view this content.
    An example of use is included in the attachment. This is not the only way.
    You can pass the second argument of the function as a reference to a cell containing color components (K1, K2 or K3)
    Please Login or Register  to view this content.
    or as a string, e.g.
    Please Login or Register  to view this content.
    Artik
    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)

Similar Threads

  1. Font colour based on Cell colour
    By Geoff_ in forum Excel General
    Replies: 1
    Last Post: 05-29-2018, 09:48 AM
  2. Changing shape and font colour based on text
    By cristihendrix in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-23-2017, 06:51 AM
  3. [SOLVED] Count Based on Text and Font colour
    By SamFitz in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-02-2016, 12:39 PM
  4. [SOLVED] Text Box Font Colour Change
    By Broobi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-11-2014, 07:14 AM
  5. Font colour of text in MsgBox?
    By shiftyspina in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-02-2013, 10:49 AM
  6. Extract Cell Font/Background Colour
    By icu222much in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 07-02-2010, 11:17 PM
  7. [SOLVED] Value based on Font colour
    By coach.32 in forum Excel General
    Replies: 4
    Last Post: 11-21-2009, 01:00 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