Excel Hacks: Make Your Data Pop with Active Row and Column Highlighting

Photo of author
Written By Chris

Just a simple "data guy". Changing the world one formula at a time.

Have you ever uttered that exhausted sigh when you’ve lost your place while working with data ranges in Excel? It can be challenging to compare entries when jumping from multiple files or applications. And constantly applying and removing colors as you work through the data can feel like a real time-killer. 

Let me introduce you to a simple Excel hack to highlight your active rows and columns with just one click, making it easier to bookmark your location in your data range.

By using conditional formatting and a little VBA, you can set up Excel to automatically highlight your active rows and columns, saving you time and effort. After following the steps described below, you will no longer feel like you’re looking for a needle in a haystack.

And if you’re more of a visual learner, check out this video to walk you through the same process below.

Highlighting Active Rows

To make your data analysis tasks easier than ever, you can apply a simple Excel trick using conditional formatting.

First, select the range of data by clicking anywhere in the field and pressing CTRL + A. Then, go to the Home tab and click the Conditional Formatting drop-down menu. Select New Rule and choose the last option, “Use a formula to determine which cells to format.”

new conditional formatting rule for active rows

In the formula bar, type =CELL(“row”)=ROW(), which tells Excel to check the row of the active cell and return the row number. Pick a fill color to highlight the active row when it’s selected, and press OK twice to apply the rule.

Now, the active cell row will be highlighted, but unfortunately, Excel needs an update to recognize a change in the active cell. By pressing F9, you can force the update to occur, and the highlight will move to the newly selected row. 

By following these steps, you can easily keep track of the data most important to you.

Using VBA for Automatic Updates

While this does make things easier, it’s still not exactly automated. The good news is that you can bypass the F9 requirement altogether by using some VBA code. And if you aren’t comfortable with VBA, don’t worry! You’ll barely need to do anything to get the job done.

To make the highlighting update automatically with VBA, locate the Developer tab in the ribbon and select the icon for Visual Basic. Or right-click on the sheet tab and select ‘View Code.’ 

In the VBA window, change ‘General’ to the sheet you’re working on. After the opening line of code, hit enter and simply type Application.Calculate.

vba application calculate

Return to your Excel sheet, and the active row will highlight automatically every time you select a new cell, improving your efficiency while working with large datasets.

Highlighting Active Columns

It could be the active columns you’re worried about. If so, the process is the same except for a slight adjustment to the conditional formatting formula.

Open the Conditional Formatting drop-down under the Home tab and select Manage Rules. Select your existing rule and hit the Edit button. You can use the current formula(=CELL(“row”)=ROW()) and just change any references for “row” to “column.

For instance, the updated formula will be =CELL(“col”)=COLUMN().

Now apply the change, and the column of your active cell will be highlighted.

Combined Highlighting for Rows and Columns

But why stop there? Why not highlight both the active row and column?

For highlighting both the active rows and columns, you’ll need to modify the formula again by inserting the start of an OR function after the equal sign.

Following the end of the COLUMN() function, insert a comma and re-enter your first formula for highlighting the active row.


Don’t forget to add the extra closing parenthesis for your OR function!

Apply the updated formatting rule, which will result in the active cell’s row and column being highlighted like a target.

highlight active rows and column like a target

Customizing Formatting Styles

To make your customization even more visually appealing and give it an undeniable pop, you can create two separate conditional formatting rules for rows and columns using different colors

Simply use the examples above, and instead of combining the two into one formula, give them each their own rule. From there, you can set one with a more appealing fill color. And the other rule can be assigned a different color.

You can even give them some custom font, bold them, and apply a unique border. Whatever makes it stand out the most to you! This will help you maintain your focus and give you the seamless workflow in Excel you’ve been looking for.

custom formatting for row and column to stand out

Leave a Comment