How to Highlight Selected Cells in Excel (5 Easy Ways)

Method 1 – Using Define Name to Highlight Selected Cells in Excel

Step 1: Go to Formulas Tab > Select Define Name (in Define Names section).

Define Name-How to Highlight Selected Cells in Excel

Step 2: A New Name window will open.

  • In the New Name window, enter a desired name (e.g., Category) in the Name
  • Select Define Name as Scope.
  • Click on the Icon next to the Refers to box to select cells or a range of cells you want to assign the Name Category

New Name

Step 3: Select the cells or range of cells (e.g., B4:B21) to define as Category.

Define Name Range-How to Highlight Selected Cells in Excel

Step 4: ENTER to return to the New Name window, then Click OK.

Assigned Name

The Name Box (Left box to the Formula Bar box) will now show the assigned name.

Using the Name Box

Name Box

Step 1: Select cells or a range i.e., C4:C21) of cells, then go to the Name Box and type any Name (i.e., Product) you want. Hit Enter.

Defined Name-Product

Assign names as needed. Selecting a name from the Name box highlights the corresponding cells.

Define Name result-How to Highlight Selected Cells in Excel

You can even assign multiple names based on your data types.


Method 2 – Applying Excel Format Cells Feature to Highlight Selected Cells 

Step 1: Select cells or a range of cells and Right-Click on any of the selected cells. From the Context Menu options, select Format Cells.

Format cells-How to Highlight Selected Cells in Excel

Step 2: In the Format Cells window, Select Fill as the highlighting method and Choose any color (e.g., Yellow). Click OK.

Using the Format Cells window

Alternatively, press Ctrl+1 to open the Format Cells window.

The selected cells or range of cells will be highlighted.

Format cells final result-How to Highlight Selected Cells in Excel

Read More: How to Highlight Cells in Excel but Not Print


Method 3 – Using Cell Styles to Highlight Selected Cells in Excel

Step 1: Go to Home Tab > Select Cell Styles (in Styles section) > Select New Cell Style.

Cell styles-How to Highlight Selected Cells in Excel

Step 2: In the Style command box, type a Style name (e.g., Highlight). Click on Format.

Using the Style window

Step 3: Click on Fill, and choose any color (e.g., Yellow) to Highlight the cells. Click OK.

Utilizing the Fill tab from the Format Cells window

Step 4: Click OK on the Style dialog box.

styles window-How to Highlight Selected Cells in Excel

Step 5: Select a cell or a range of cells. Go to Home Tab > Select Cell Styles (in Styles section).

You’ll see a custom Highlight cell style containing all the highlight options you put into Step 3.

Click on the Highlight cell style option.

Custom cell style

The selected cells get highlighted by the Fill color (i.e., Yellow) you chose.

Cell styles final result-How to Highlight Selected Cells in Excel


Method 4 – Using Excel Conditional Formatting to Highlight Selected Cells (Row and Column)

In this case, we can use formulas to highlight the active cell’s row and column together or individually.

Case 1: Both Row and Column in Same Color

To highlight both active cell’s rows and columns we use the OR function.

Step 1: Click on any cell (e.g., C12) for which you want to highlight both the row and column.

Go to Home Tab > Select Conditional Formatting (in Style section)> Choose New Rule.

conditional formatting-How to Highlight Selected Cells in Excel

Step 2: In the New Formatting Rule window, Choose Use a formula to determine which cell to format from Select a Rule Type option.

Paste the following formula in the Edit the Rule Description box.

=OR(CELL("col")=COLUMN(),CELL("row")=ROW())

Here in the formula,

CELL(“col”)=COLUMN(); compares the selected cell’s column that is CELL(“col”) to the cell’s column to be highlighted that is COLUMN(). 

CELL(“row”)=ROW();compares the selected cell’s row that is CELL(“col”) to the cell’s row to be highlighted that is ROW().

We patch them with the OR function to highlight the cell’s row and column if either of the arguments is TRUE.

Follow Step 3 of Method 3 to choose the Fill color (i.e., Yellow).

Click OK.

New formatting rule

You’ll see an outcome similar to the image below.

New formatting rule result

Step 3: Go to Conditional Formatting > Choose Manage Rules.

Choosing Manage Rule from the drop-down

Step 4: Select the whole range (e.g., B3:H21) in the Applies to command box. Click on Apply.

Clicking Apply from the Conditional Formatting Rule Manager window

The active cell’s row and column will be highlighted.

conditional formatting final result-How to Highlight Selected Cells in Excel


Case 2: Row and Column in Different Color

Step 1: Repeat Steps 1 to 4 of Case 1.

Replace the formula with two New Rules.

=CELL("row")=ROW()
=CELL("col")=COLUMN()

These two formulas declare the same argument as they did in Case 1.

Select two different Fill colors following Step 3 of Method 3.

Select the whole dataset to Applies to the dialog box.

Click on Apply.

Rules Manager

The resultant will be similar to the image below.

conditional formatting final result-How to Highlight Selected Cells in Excel


Case 3: Only Row or Column

Step 1:  Repeat Step 1 of Case 2.

Choose any of the Fill Color as No Color. In this case, we select the row formula to highlight the row with no color.

Click on Apply.

Rules Manager-How to Highlight Selected Cells in Excel

The outcome will be similar to the following image.

conditional formatting result-How to Highlight Selected Cells in Excel

You can choose No Color as Fill Color for Column and the result will be the opposite.


Method 5 – Using VBA Macro Code to Highlight Selected Cells

Step 1: Press ALT+F11 to open the Visual Basic window.

vba macro code-How to Highlight Selected Cells in Excel

Step 2: Double-click on Sheet3 (VBAMacroCode) to bring up the Visual Basic Worksheet. Paste and save the following code in the Worksheet.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Selection.Worksheet.Cells.FormatConditions.Delete
Selection.FormatConditions.Add xlExpression, , "TRUE"
Selection.FormatConditions(1).Interior.Color = vbYellow
End Sub
			

VBA Macro Code

The code deletes any previous cell formats and formats any selection, particularly in Sheet3. In the code, we chose Yellow as the highlighting color. You can choose any color.

Step 3: Go back to the Excel Worksheet, select any cell or range of cells; you’ll see it simultaneously get highlighted with Yellow color.

vba macro code result-How to Highlight Selected Cells in Excel

Read More: Cells Are Not Highlighting in Excel Formula


Download Practice Workbook


Related Articles


<< Go Back to Highlight CellHighlight in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Maruf Islam
Maruf Islam

MARUF ISLAM is an excellent marine engineer who loves working with Excel and diving into VBA programming. For him, programming is like a superhero tool that saves time when dealing with data, files, and the internet. His skills go beyond the basics, including ABACUS, AutoCAD, Rhinoceros, Maxsurf, and Hydromax. He got his B.Sc in Naval Architecture & Marine Engineering from BUET, and now he's switched gears, working as a content developer. In this role, he creates techy content... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo