3 ways to highlight cells or rows in Excel

Microsoft Excel comes with a number of features that allow users to create spreadsheets from basic to advanced, making professional life easier. However, when dealing with large, complex data sets in Excel, it is easy to lose interest.

One easy way to simplify your spreadsheet is to highlight checkboxes and rows with checkboxes so that they stand out. The following article will discuss in detail different ways to do this.

Highlight cells or rows using VBA code

To highlight a cell or row in Excel that has a checkbox, the first method we will discuss involves using VBA code. VBA is basically a programming language in Excel that is used to automate tasks. You enter the code relevant to your requirement and Excel will do the task for you, saving you hours of manual work.

We all know that it takes hours in Excel when you have to do everything manually. VBA code handles large amounts of data to make this process easier for you. Follow these steps to proceed with this method:

1. Launch Excel and open the targeted worksheet.

2. Right-click on the Sheet tab at the bottom and select View Code from the context menu.

3 ways to highlight cells or rows in Excel
Select View Code

3. This will open the Microsoft Visual Basic for Applications dialog box . Copy the code mentioned below and paste it in the VBA window. You can modify the cell range, height and width as per your requirement.

Sub AddCheckBox()Dim cell As Range Application.ScreenUpdating = False For Each cell In Range("A1:A12") With ActiveSheet.CheckBoxes.Add(cell.Left, _ cell.Top, cell.Width = 17, cell.Height = 15) .LinkedCell = cell.Offset(, 5).Address(External:=False).Interior.ColorIndex = xlNone .Caption = "" End With Next With Range("A1:A12") .Rows.RowHeight = 17 End With Range("A1").EntireColumn.Select Selection.ColumnWidth = 6# Range("B1").Select Application.ScreenUpdating = True End Sub
3 ways to highlight cells or rows in Excel
Microsoft Visual Basic for Applications dialog box

Highlight cells or rows using Conditional Formatting

The next method on the list to highlight a cell or row is to use the Conditional Formatting option. Conditional Formatting allows users to modify the appearance of cells based on preferred criteria.

In this method, the article will apply a condition that will label the highlighted checkboxes as True and highlight them (this can be modified as per your requirement). The rest of the rows will be in a standard format, making it easy to differentiate between completed and incomplete tasks.

Here's how you can use Conditional Formatting to highlight a cell or row:

1. Before you can apply conditional formatting, you must add check boxes to your table. To do this, go to the Developer tab in Excel.

2. In the Controls section , select Insert and click the check box icon in the Form Controls section.

3 ways to highlight cells or rows in Excel
Click the checkbox icon in the Form Controls section

3. Add checkboxes to the cells you want.

4. Then, select the cell with the checkbox and drag the cursor to the bottom of the table. This will add the checkbox to all cells in the table.

3 ways to highlight cells or rows in Excel
Add checkboxes to all cells

5. Now, right-click on the first cell with the checkbox and select Format Control from the context menu. This will launch the Format Object dialog box.

3 ways to highlight cells or rows in Excel
Format Object dialog box

6. Find the Cell link option and enter the name of the cell you want to link your first checkbox to. For example, our first checkbox is in cell H4 and we want to label the cell right before it, so we'll add I4 to the text field.

3 ways to highlight cells or rows in Excel
Add I4 to text field

7. Click OK to apply the changes and perform the same steps for the rest of the check boxes in the table.

3 ways to highlight cells or rows in Excel
Click OK

8. Once done, select the rows you want to highlight and click on the Conditional Formatting option in the Home tab.

3 ways to highlight cells or rows in Excel
Click on the Conditional Formatting option

9. Select New Rule from the context menu.

3 ways to highlight cells or rows in Excel
Select New Rule

10. In the following dialog box, click Use a formula to determine which cells to format in the Select a Rule Type option .

3 ways to highlight cells or rows in Excel
Click Use a formula to determine which cells to format

11. Now go to Edit the Rule Description section and enter =IF($I4=TRUE,TRUE,FALSE) in the text field.

3 ways to highlight cells or rows in Excel
Enter =IF($I4=TRUE,TRUE,FALSE)

12. Click the Format button and choose a highlight color.

13. Then click OK to save the changes.

3 ways to highlight cells or rows in Excel
Save changes

The selected rows or cells will be highlighted with conditional formatting.

Highlight rows with different colors using Conditional Formatting

Sometimes you want to highlight different rows with different colors to better organize your spreadsheet. Luckily, Conditional Formatting allows you to do that too.

For example, if you are listing your to-dos and want to highlight items that are due more than 30 and 45 days in duration, you can highlight such items in different colors. Here's how:

1. Select the rows in the table that you want to highlight (usually the entire data set).

2. In the Home tab and click the Conditional Formatting option.

3. Select New Rules.

4. In the following dialog box, select Use a formula to determine which cells to format in the Select a Rule Type section .

5. Enter the following formula in the text field for Format values ​​where this formula is true . Remember that the article is applying the formula according to the example table. To make this method work in your case, you will have to change the values ​​accordingly.

$C4>20
3 ways to highlight cells or rows in Excel
Enter formula

6. Click the Format button and choose a color.

7. Click OK to save the changes.

3 ways to highlight cells or rows in Excel
Click OK to save changes

8. Finally, click OK again. Items older than 20 days will be highlighted.

3 ways to highlight cells or rows in Excel
Highlighted items

9. Now, select the New Rule button again and click Use a formula to determine which cells to format under Select a Rule Type .

10. Enter the following formula in the Format values ​​where this formula is true text field .

$C4>35
3 ways to highlight cells or rows in Excel
Enter formula

11. Click the Format button and choose a color.

12. Select OK.

3 ways to highlight cells or rows in Excel
Select OK

13. Click OK again to save the changes.

3 ways to highlight cells or rows in Excel
Click OK again

This will help you highlight rows and cells with different colors in Excel. If you want to cross something out in your spreadsheet, you can strikethrough it in Excel.

Highlighting rows and cells in an Excel spreadsheet can have many benefits. In addition to bringing your spreadsheet to life, doing so makes your data easier to see.

Leave a Comment

Troubleshooting Microsoft Teams Error L License

Troubleshooting Microsoft Teams Error L License

Stuck with Microsoft Teams "Error L" License error? Follow this step-by-step troubleshooting guide to resolve licensing issues quickly, restore access, and boost productivity without IT hassle. Updated with latest fixes.

Troubleshooting Microsoft Teams Video Call Freezing

Troubleshooting Microsoft Teams Video Call Freezing

Tired of Microsoft Teams video call freezing mid-meeting? Follow this proven troubleshooting Microsoft Teams video call freezing guide with quick fixes, advanced tips, and real solutions to restore smooth video instantly.

How to Fix Microsoft Teams Download Failed Due to Unexpected Error

How to Fix Microsoft Teams Download Failed Due to Unexpected Error

Frustrated by Microsoft Teams 'Download Failed Due to Unexpected Error'? Discover proven, step-by-step solutions to fix this common issue quickly and get back to seamless collaboration. Updated with the latest fixes for peak performance.

Why Did My Microsoft Teams Recording Fail? Common Reasons

Why Did My Microsoft Teams Recording Fail? Common Reasons

Frustrated because your Microsoft Teams recording failed? Uncover the top common reasons like permissions issues, storage limits, and network glitches, plus step-by-step fixes to prevent future failures and record flawlessly every time.

Solving Microsoft Teams Error B Connection

Solving Microsoft Teams Error B Connection

Struggling with Microsoft Teams "Error B" connection? Discover step-by-step fixes for smooth connectivity. Clear cache, check networks, and more in this ultimate guide to resolving Error B instantly.

How to Fix Microsoft Teams Application Is In A Bad State Error

How to Fix Microsoft Teams Application Is In A Bad State Error

Tired of the frustrating Microsoft Teams "Application Is In A Bad State" error crashing your meetings? Discover proven, step-by-step fixes to resolve it quickly and restore smooth teamwork. Updated with the latest solutions.

How to Check Microsoft Teams Version History and Build Number

How to Check Microsoft Teams Version History and Build Number

Discover simple steps to check your Microsoft Teams version history and build number on desktop, web, and mobile. Stay updated with the latest features and fixes effortlessly. Perfect for IT pros and everyday users.

How to Fix Microsoft Teams Uninstall Error Stuck

How to Fix Microsoft Teams Uninstall Error Stuck

Tired of Microsoft Teams "Uninstall Error" Stuck? Discover proven, step-by-step fixes to completely remove Teams from your PC. Works on latest Windows versions – no tech skills needed!

Troubleshooting Microsoft Teams Where is My Team? Error

Troubleshooting Microsoft Teams Where is My Team? Error

Facing the frustrating Microsoft Teams "Where is My Team?" error? Discover step-by-step troubleshooting tips, common causes, and quick fixes to resolve it instantly and resume seamless collaboration. Updated with the latest solutions.

How to Fix Microsoft Teams VDI Error on Virtual Machines

How to Fix Microsoft Teams VDI Error on Virtual Machines

Tired of Microsoft Teams VDI errors crashing your virtual machine calls? Get step-by-step fixes for audio glitches, video freezes, and optimization issues on Citrix, VMware, or RDP setups. Boost productivity now!

How to Fix Microsoft Teams Error AADSTS70011

How to Fix Microsoft Teams Error AADSTS70011

Struggling with Microsoft Teams Error AADSTS70011? Discover step-by-step fixes for invalid scope errors, clear cache tips, and quick authentication resets to get back to seamless collaboration in minutes. Updated with latest Teams patches.

Troubleshooting Microsoft Teams Unknown Error: Something Went Wrong

Troubleshooting Microsoft Teams Unknown Error: Something Went Wrong

Stuck with Microsoft Teams unknown error "Something Went Wrong"? Discover quick, effective troubleshooting steps to resolve it instantly. Updated with the latest fixes for seamless collaboration.

Troubleshooting Microsoft Teams Download for PC Not Working

Troubleshooting Microsoft Teams Download for PC Not Working

Is Microsoft Teams download not working on your PC? Discover proven fixes for installation errors, slow downloads, and crashes. Get Teams running smoothly in minutes with our step-by-step guide.

Solving Microsoft Teams Wiki Tab Missing Error

Solving Microsoft Teams Wiki Tab Missing Error

Tired of the frustrating Microsoft Teams Wiki Tab Missing error? Follow our proven, step-by-step guide to restore your Wiki tab instantly and boost team collaboration without hassle.

How to Fix Microsoft Teams Chat Message Failed to Send

How to Fix Microsoft Teams Chat Message Failed to Send

Tired of Microsoft Teams chat messages failing to send? Follow our expert, step-by-step guide to fix the "Failed to Send" error quickly and get back to productive chats without frustration. Proven solutions for all users.