+ Reply to Thread
Results 1 to 5 of 5

Excel - Italicise Words in Text Cell Found in Glossary List

  1. #1
    Registered User
    Join Date
    03-07-2017
    Location
    High Wycombe, England
    MS-Off Ver
    Office 365
    Posts
    4

    Excel - Italicise Words in Text Cell Found in Glossary List

    Dear Forum,

    I've viewed a number of threads and answers that are close to my problem but not yet found the VBA answer. I have built a simple 2 column Office 365 Excel Glossary with currently 4000 rows of data. Col A contains an alphabetical list of words; Col B contains a description of each of those words. But, because it's a Glossary, any value in Col A could be found in any cell in Col B.

    What I want to do is Italicise the words found in Col B that match any value in Col A, but without italicising all the other words in Col B. Forum solutions tend to require an input field that defines each cell to be examined separated by a comma. Clearly, that solution is a little too mandraulic! Anybody out there seen / have a better solution?

    Brian

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Excel - Italicise Words in Text Cell Found in Glossary List

    Without a copy of your data no one is even going to be able to hazard a guess... Click the 'Go Advanced' button on the Quick Reply box below, scroll down to 'Manage Attachments' upload a representative sample - the whole 4000 row worksheet is not needed.

  3. #3
    Registered User
    Join Date
    03-07-2017
    Location
    High Wycombe, England
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Excel - Italicise Words in Text Cell Found in Glossary List

    cytop,
    Unfortunately my network security will neither allow me to upload nor download files to the Forum - I tried to attach the first 100 rows of my data. As stated in my request, I would like to italicise any word in any cell, but not the whole cell, in Col B that appears in the alphabetical list in Col A.

  4. #4
    Registered User
    Join Date
    03-07-2017
    Location
    High Wycombe, England
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Excel - Italicise Words in Text Cell Found in Glossary List

    cytop,

    Would the following data set be good enough to review for my idea? What I require is that every word from Col A is italicised in every Col B cell.

    Col A Col B
    Alpha The first phonetic alphabet word is Alpha, it comes before Bravo, Charlie and Delta.
    Bravo The second phonetic alphabet word is Bravo, it comes before Charlie and Delta and after Alpha.
    Charlie The third phonetic alphabet word is Charlie, it comes before Delta and after Alpha and Bravo.
    Delta The fourth phonetic alphabet word is Delta, it comes after Alpha, Bravo and Charlie.

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,826

    Re: Excel - Italicise Words in Text Cell Found in Glossary List

    What research have you done? What have you found? What, specifically, are you stuck on?

    I expect that somewhere in this research, you have met the .Characters object that is used to access individual parts of a text string in a cell. https://msdn.microsoft.com/en-us/lib.../ff194098.aspx
    I expect you have also encountered the Instr() function that can be used to locate one substring within a larger string. https://msdn.microsoft.com/en-us/lib.../gg264811.aspx
    Somewhere along the way, you will need a couple of loops, so I assume you have encountered loops in VBA. http://www.excel-easy.com/vba/loop.html

    Without going to all the trouble to code and debug a procedure, here's how I would expect to approach this task (in more of a flow chart):

    1) Start with the first entry in the main string range. outer loop.
    2) start with the first entry in the substring range/array. (alpha) inner loop
    3) Use Instr() to see if this substring is in this main string.
    3a) If not, go to the next entry in substring range/array
    3b) If so, then use the .Characters object to format the word as italic
    4) Go back to 2 for the next entry in substring range/array and repeat until all entries in substring range are tested and formatted
    5) Go back to 1 for the next entry in mainstring range and repeat until all entries have been searched and formatted.

    What parts of that do you know how to do? What parts of that do you need help with?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ 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] Search for the text in cell A1 in a list and remove the text if found in the list
    By kak0 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-24-2014, 11:01 PM
  2. Replies: 3
    Last Post: 08-14-2013, 10:38 AM
  3. [SOLVED] Search cell to see if it contains text from a list of words
    By amurray2307 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-08-2013, 05:41 AM
  4. [SOLVED] Text formula to separate words in glossary
    By patriciabr in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-15-2013, 11:19 AM
  5. How do I compare text in Excel cells to see if same words are found?
    By pankajsc96 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-12-2013, 09:11 AM
  6. Looking for VBA that will search for a list of words and add a logo if found
    By kmckie in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-29-2012, 06:48 AM
  7. Replies: 1
    Last Post: 04-04-2012, 07:15 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