+ Reply to Thread
Results 1 to 4 of 4

Partial Formatting of Cell

  1. #1
    Registered User
    Join Date
    07-29-2020
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    36

    Partial Formatting of Cell

    Hi. I am trying to find a way to make the characters before the first underscore change to a colour of my choosing (e.g. red in this case), for all cells in the first column. I presume this can be done with VBA, and I am slowly getting better at using it, but I am unsure how to do a partial colouring of the cells (I know how to do the entire cell, but that's not what I want to do). Any help would be appreciated. Thanks.

    EDIT - The first cell in the attached file shows an example of what I am trying to do.
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Partial Formatting of Cell

    Here's one way


    Please Login or Register  to view this content.
    Obviously if it's always the first 5 characters you need colouring then you cam leave out the x = Instr....line
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,883

    Re: Partial Formatting of Cell

    https://superuser.com/questions/5277...-cell-in-excel
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    07-29-2020
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    36

    Re: Partial Formatting of Cell

    Quote Originally Posted by Richard Buttrey View Post
    Here's one way


    Please Login or Register  to view this content.
    Obviously if it's always the first 5 characters you need colouring then you cam leave out the x = Instr....line
    Thank you so much. I think I am slowly beginning to get a better idea as to how VBA works (e.g. defining variables / items before use, basic for loops etc...).

+ 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] Partial Formatting
    By CDandVinyl in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-22-2020, 12:26 PM
  2. [SOLVED] Lookup partial values and if match return partial value from another cell
    By Renejorgensen in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-01-2017, 07:53 AM
  3. Conditional Formatting that contain text and partial
    By nathanexcelhelp in forum Excel General
    Replies: 4
    Last Post: 02-17-2017, 09:26 AM
  4. finding formatting of partial cell
    By hemiceni in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-27-2016, 09:34 PM
  5. [SOLVED] Partial conditional formatting based on the colour of a cell
    By ello2001 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-07-2014, 08:17 AM
  6. Conditional Formatting Partial Match
    By n3sky in forum Excel General
    Replies: 4
    Last Post: 10-24-2011, 11:40 PM
  7. MsgBox--partial formatting
    By davidm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-04-2005, 09:49 AM

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