How To Highlight Selected Text In Excel (8 Ways)
Maybe your like
Here’s an overview of where you can find the conditional highlight options in Excel.

Method 1 – Highlight Text in Excel Using the Font Color
- Select the range of text you want to highlight.
- Go to the Font group under the Home ribbon and click on Font Color.
- Select any color from the Theme Colors group.

- The output will look to the following image.

Read More: How to Highlight Lowest Value in Excel
Method 2 – Using Excel Cell Styles to Highlight Text
- Select the cells that you want to highlight.
- Under the Home ribbon, select Cell Styles.
- Choose any of the options.

- If you choose the option Check Cell, your output will look similar to the following image.

Method 3 – Highlight Specific Text Using Format Cells
- Select the dataset.
- Press Ctrl + 1 to open the Format Cells dialog box.

- Change the options in the dialog box accordingly.

- Here’s a sample result.

Read More: How to Highlight Highest Value in Excel
Method 4 – Using a Pop-up Menu to Highlight Text in Excel
- Select the text in a certain cell. A pop-up menu would appear like the following image.
- Click on the Font Color option and select any of the colors available to highlight the text.

- Here’s a sample result.

Method 5 – Highlight Text with Conditional Formatting
- Select the range and then select Conditional Formatting under the Styles ribbon group from the Home.
- We chose “Text that Contains” as a condition.

- A dialog box appears. Provide the conditions based on which Excel will apply to format.

- Your output will look like the following image.

Method 6 – Highlight Text Using Excel Formula
- Select the text where you will apply highlighting.
- Go to Conditional Formatting and select New Rule.

- Apply a formula in the box Format values where this formula is true:

- When you click on the Format… button, a dialog box will appear prompting you to choose a color for formatting.

- Here’s a sample result.

Read More: How to Highlight Text in Text Box in Excel
Method 7 – Applying Excel VBA Code to Highlight Text
- Press Alt + F11 to open the VBA Editor.
- Under the Insert tab, click on Module.

- Copy the following VBA code.
- Paste the code in the editor and save it.

- Go back to the Excel workbook and select the whole data table.
- Press Alt + F8 to open the Macro window.
- Select the Highlight_Text code and hit Run.

- An input box will appear. Insert the text you want to highlight. We put “Pencil” in the box since we want to highlight it in the data table.

- Your output will look like the following image.

How Does the Code Function?
Inp = InputBox(“Enter text to highlight:”)
Prompts the user to provide the text that the code will highlight. Assign the user’s input to a variable named “Inp”.
Set rng = Range(“B2:D11”)
Declares the variable “rng” to hold the range from B2 to D11 since our data is in this range.
For Each cell In rng
Loops through all the cells in the range “rng” and checks whether it meets certain criteria.
If InStr(1, cell.Value, Inp, vbTextCompare) > 0 Then
The VBA InStr function starts the comparison of text from the beginning of each “cell” in the “rng” variable. If it finds a match, then it will return a value greater than zero (the position of the starting substring in the first string). In that case, the condition becomes true, and the code is on the next line under the condition.
How to Create a Highlight Style in Excel
- Select the Home tab and go to Cell Styles.
- Under the Cell Styles group, click on New Styles.

- In the Style box, name your cell style and click on the Format… button.

- In the Format Cells dialog box, under the Font tab, modify the Font as needed.

- We will also change the default Fill.

- Click OK twice to create the new style.
- Select the whole dataset except the heading and click on Cell Styles and choose My Style.

Highlight More Than One Text
- Open the VBA Editor.
- Copy the following code.
- Paste the code into the editor and save it.

- Go back to the Excel workbook and select the whole data table.
- Press Alt + F8 together to open the Macro window.
- Select the Highlight_Multiple code and hit Run.

- An input box will appear where you will write down the texts you want to highlight. We put “Pencil,3,2” in the box since we want to highlight it in the data table. Separate each string with a comma (without spaces).

- Excel has colored all the cells in the dataset that contain at least one of the chosen strings.

How Does the Code Function?
The above code is very similar to the code we used in the earlier session. We have modified that code just in 2 places.
- We introduced an extra For loop in order to loop all the words that the user gives.
- Instead of using the direct input, we first used the VBA Trim function to extract the words free of other delimiters like commas.
How to Highlight Duplicate Text in Excel
- Select the range where you want to check for duplicates.
- Under Conditional Formatting, select Highlight Cells Rules and choose Duplicate Values.

- A user prompt box will appear, giving you the option to choose the format you want to apply.
- Choose a format and click OK.

- The duplicate values in your dataset are highlighted now.

Frequently Asked Questions
Does highlighting cells affect the calculation or function results in Excel?
Highlighting is just a visual formatting feature that does not impact the data or formulas.
Are there any limitations to highlighting cells in Excel?
Yes, excessive highlighting in your worksheet can impact performance. Also, the highlighting you apply to cells may not appear as expected when printing a worksheet. So, it is a good idea to preview and adjust print settings before printing to ensure accuracy.
Can I highlight cells in Excel using a formula?
Yes, you can highlight cells in Excel using a formula by applying conditional formatting.
Download the Practice Workbook
Highlighting Text.xlsm
Related Articles
- How to Highlight a Column in Excel
- How to Compare Two Excel Sheets and Highlight Differences
<< Go Back to Highlight in Excel | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!Tag » How To Highlight In Excel
-
Highlight Cells - Microsoft Support
-
How To Highlight In Excel - Lifewire
-
Use Conditional Formatting To Highlight Information - Microsoft Support
-
Excel Highlight Rows And Records - YouTube
-
The Top 5 Keyboard Shortcuts For Highlighting In Excel - Causal
-
How Could I Set A Text Highlight Color—not Cell Shading—for A ...
-
Excel Formula: Highlight Cells That Contain | Exceljet
-
Use Excel Conditional Formatting To Highlight Cells
-
How To Highlight Cells In Excel - Video & Lesson Transcript
-
How To Automatically Highlight Certain Text In Microsoft Excel
-
How To Highlight On Excel - Business Computer Skills
-
Excel Highlight Cell Rules - Text That Contains - W3Schools
-
The Highlight Function In Excel - Small Business