+ Reply to Thread
Results 1 to 7 of 7

Automatic partial formatting of text between certain values

  1. #1
    Registered User
    Join Date
    05-01-2019
    Location
    Australia
    MS-Off Ver
    Office365
    Posts
    4

    Question Automatic partial formatting of text between certain values

    I'm hoping someone can help me out further with this.

    I've managed to locate some code that will bold text between brackets.
    And I've also managed to change the Excel code so that the text between the said brackets is red.

    What I am wanting to achieve is for Excel to automatically format partial text between double angled brackets.
    When I change the "(" or ")" to "<<" and ">>" it no longer works.

    I'm very appreciative if anyone has any tips or advice!
    (PS. I'm very new to the VBA side of things, in case you couldn't already tell! :P )
    Attached Images Attached Images
    Last edited by schjacob; 05-01-2019 at 07:44 AM.

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

    Re: Automatic partial formatting of text between certain values

    try
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-01-2019
    Location
    Australia
    MS-Off Ver
    Office365
    Posts
    4

    Re: Automatic partial formatting of text between certain values

    Thank you!
    I am looking to include the angled brackets in the formatting as well (so that the text and the brackets both have the formatting applied). How would I get those brackets included?

    If I wanted to change colour, I was doing that by adding a line at row 14 like:
    .Color = Red
    But this wasn't working. What is the colour parameter?
    Last edited by schjacob; 05-07-2019 at 02:23 AM. Reason: Accidentally hit post too soon!

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

    Re: Automatic partial formatting of text between certain values

    1) Change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    2) Change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-01-2019
    Location
    Australia
    MS-Off Ver
    Office365
    Posts
    4

    Re: Automatic partial formatting of text between certain values

    You are a legend! Thank you so so much!

    Last thing - if I wanted to add two to the one worksheet, how would I combine them both?
    I text between double angled brackets red, and text between single angle brackets blue. Can I run the same thing again just changing:

    .Pattern = "<<.+?>>"
    to be
    .Pattern = "<.+?>"

    &
    .Color = vbRed
    to be
    .Color = vbBlue

    The text between both values will be in the same cell too - not sure if that matters though...

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

    Re: Automatic partial formatting of text between certain values

    Im out so not with my pc.
    try change to
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    05-01-2019
    Location
    Australia
    MS-Off Ver
    Office365
    Posts
    4

    Re: Automatic partial formatting of text between certain values

    Worked a treat, thanks again. You're awesome!

+ 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. Conditional Formatting with Partial Text Match
    By randolaw in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-31-2018, 04:30 PM
  2. Conditional Formatting that contain text and partial
    By nathanexcelhelp in forum Excel General
    Replies: 4
    Last Post: 02-17-2017, 09:26 AM
  3. Conditional Formatting: Matching Partial Text
    By Alan_Bernardo in forum Excel General
    Replies: 1
    Last Post: 01-07-2017, 02:23 PM
  4. [SOLVED] Conditional Formatting based on partial/specific text to highlight entire row
    By bizdevdfw in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-18-2016, 04:32 PM
  5. Conditional formatting based on search of partial text column
    By SirBrock in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 12-12-2015, 09:49 AM
  6. [SOLVED] Conditional Formatting Partial Currency Values in One Column
    By bmann021 in forum Excel General
    Replies: 9
    Last Post: 08-27-2015, 11:40 AM
  7. Replies: 11
    Last Post: 02-04-2015, 01:34 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