+ Reply to Thread
Results 1 to 7 of 7

Highlight a specific text in a text string

  1. #1
    Registered User
    Join Date
    01-28-2023
    Location
    Liverpool
    MS-Off Ver
    2007
    Posts
    2

    Post Highlight a specific text in a text string

    How can I highlight a text in a text string?
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: Highlight a specific text in a text string

    You can use this CF formula:

    =AND($B$1<>"",COUNTIF($B5,"*"&$B$1&"*"))

    Applied to the range B5:B8.

    Also, you can change the formula in G5 to this:

    =COUNTIF($B$5:$D$8, "*"&F5&"*")

    then copy it down, rather than have 5 individual formulae.

    Hope this helps.

    Pete

  3. #3
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,781

    Re: Highlight a specific text in a text string

    =COUNTIF(B5,"*"&$B$1&"*")

    applies to =$B$5:$D$8

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: Highlight a specific text in a text string

    If you want to highlight cells in the table from the other stores, then use this CF formula:

    =AND($B$1<>"",COUNTIF(B5,"*"&$B$1&"*"))

    Note that I have removed the $ symbol.

    Apply this to the range B5:D8

    Hope this helps.

    Pete

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

    Re: Highlight a specific text in a text string

    Select B5:D8.For CF

    =AND($B$1<>"",ISNUMBER(SEARCH($B$1,B5)))
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  6. #6
    Registered User
    Join Date
    01-28-2023
    Location
    Liverpool
    MS-Off Ver
    2007
    Posts
    2

    Re: Highlight a specific text in a text string

    Quote Originally Posted by Pete_UK View Post
    If you want to highlight cells in the table from the other stores, then use this CF formula:

    =AND($B$1<>"",COUNTIF(B5,"*"&$B$1&"*"))

    Note that I have removed the $ symbol.

    Apply this to the range B5:D8

    Hope this helps.

    Pete
    Thanks, Pete! This is what I was looking for and figured out that it was just a matter of removing $ from B5. Cheers!

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: Highlight a specific text in a text string

    Glad to help, and thanks for the rep.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    Pete

+ 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. Replies: 10
    Last Post: 08-01-2022, 08:05 AM
  2. [SOLVED] IF functions has specific text, then multiply or divide dependant on text string
    By npereira in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-27-2018, 12:19 PM
  3. Replies: 24
    Last Post: 11-10-2015, 07:27 PM
  4. Replies: 2
    Last Post: 11-18-2014, 06:26 AM
  5. [SOLVED] Macro to convert specific text and format specific text within a string
    By Mencae in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-06-2012, 12:13 AM
  6. [SOLVED] Highlight a portion of string text (the string text is a value of a formula)
    By RaymondH in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-02-2012, 06:50 AM
  7. [SOLVED] Find Specific Text in Text String and Return Value in Adjacent Column
    By watchouse in forum Excel General
    Replies: 2
    Last Post: 07-11-2012, 03:53 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