Forum Discussion

onlysublime's avatar
onlysublime
Copper Contributor
May 17, 2020

Conditional Formatting Bold based on words

Hi, I want to use Conditional Formatting to show the words in bold if any of the following words are in the cell (see list below).

 

Right now, I've created a rule per word. Which means I'm going to have 20+ rules for bolding text when all is said and done. Is there anyway to avoid that? Is there a performance hit to the spreadsheet by having so many conditional formatting rules?

Words:

metformin
trulicity
bydureon
farxiga
jardiance
glimeperide
glipizide
januvia
alogliptin

statin
atorvastatin
lovastatin
simvastatin
pravastatin

lisinopril
losartan
valsartan
irbesartan

6 Replies

  • karchavez's avatar
    karchavez
    Brass Contributor

    Hello onlysublime ,

    Please use following steps and let me know! 

    Step 1: Write the list of words in one column

    Step 2: Select the column to format

     

    Step 3: Go to Conditional Formatting -New Rule

     

    Step 4: Select "Use a formula..."

    Step 5: Write next formula

    The Range inside the COUNTIF is your list and the second parameter is the first value of your column to format.

    If you need to add more words to the list you only need to modify your range in the formula.

     

    Note: You can assign a name to the range and use it inside the COUNTIF pressing F3, this step is useful if you want to put your list on another sheet inside your workbook.

     

    Regards!

    • peteryac60's avatar
      peteryac60
      Iron Contributor

      karchavez 

       

      Hi 

       

      I am interested in your solution but do not quite follow it!

       

      In Step 2 you have the list of words in Column A. In Column C you appear to have a list or arbitrary words that do not appear to have any connection with Column A?

       

      So when you do your formatting in subsequent steps I am sure how this relates to the words in column A that we are trying to BOLD?

       

      Can you clarify please?

       

      thanks 

       

      Peter

       

       

       

       

      • karchavez's avatar
        karchavez
        Brass Contributor

        Hi peteryac60 ,

        Column C is the column to format, I put arbitrary words to ensure the formula works properly

Resources