+ Reply to Thread
Results 1 to 3 of 3

Change partial text color, up to specific character (loop)

  1. #1
    Forum Contributor
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    MS Office: Excel 365
    Posts
    163

    Change partial text color, up to specific character (loop)

    Hi --

    I would like to apply a code that changes the first characters of a cell up-to (& including) the "/" character. I would like for this partial string to be formatted to the simple 'red' color.

    For instance, in "hello world / how are you?" I would like for it to color "hello world /" in red. The remaining text should remain as is.

    I would then like for it to loop this same function for every row, until it hits a blank cell.

    Could you please assist?

    Thank you,
    k

  2. #2
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Change partial text color, up to specific character (loop)

    Range is A2:A7. change as required.
    Please Login or Register  to view this content.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  3. #3
    Forum Contributor
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    MS Office: Excel 365
    Posts
    163

    Re: Change partial text color, up to specific character (loop)

    Thank you --

    I took your Cel.Characters(Start:=1, Length:=K).Font.Color = -16776961 line and played w/ the peripherals to make the loop dynamic for any range size


+ 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] Conditional Formatting based on partial/specific text to Change formating
    By mh348 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-23-2021, 10:36 AM
  2. Replies: 4
    Last Post: 04-20-2015, 12:29 PM
  3. vba Find specific text font and change color
    By jacgeld in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-18-2014, 08:16 AM
  4. Replies: 0
    Last Post: 03-12-2013, 04:29 PM
  5. Change font color of specific text as a result of an if statement
    By Triscia in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-07-2013, 11:47 AM
  6. Change specific text color vba
    By TechRetard in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-20-2012, 12:22 PM
  7. Change color of specific text within a cell?
    By avarga82@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-13-2006, 12:35 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