Highlight the active row and column in an Excel worksheet
Resources

Highlight the active row and column in an Excel worksheet

Ever lose track of where you are in a worksheet?

It's a common problem when navigating large datasets. You're flicking between cells, switching applications, and your eyes are darting between places.

You're handling sensitive data and want to be sure you're focusing on the correct record, but the further away you get from the row and column headers β€” the worse it gets.

You wish there were a better solution than meticulously sliding your index finger across the screen.

Unfortunately, Excel doesn't have a built-in feature for this, but there is a workaround.

Do the following:

1. Select a range.
2. Go to Home > Conditional Formatting > New Rule.
3. Select 'Use a formula to determine which cells to format'.
4. Input =π™Ύπš(𝙲𝙴𝙻𝙻("πšŒπš˜πš•")=π™²π™Ύπ™»πš„π™Όπ™½(),𝙲𝙴𝙻𝙻("πš›πš˜πš ")=πšπ™Ύπš†()).
5. Select Format and choose a fill colour.
6. Select OK twice.

You can now highlight the active row and column of the cell you're in by pressing F9 to recalculate the workbook. The upside of this method is there's no VBA. The downside is it isn't automatic.

However, adding some VBA code allows you to create an event that automatically performs this recalculation:

1. Press Alt + F11 to open the VBA Editor.
2. Open the relevant sheet object.
3. Input the code:

π™Ώπš›πš’πšŸπšŠπšπšŽ πš‚πšžπš‹ πš†πš˜πš›πš”πšœπš‘πšŽπšŽπš_πš‚πšŽπš•πšŽπšŒπšπš’πš˜πš—π™²πš‘πšŠπš—πšπšŽ(π™±πš’πš…πšŠπš• πšƒπšŠπš›πšπšŽπš π™°πšœ πšπšŠπš—πšπšŽ)
π™Έπš π™°πš™πš™πš•πš’πšŒπšŠπšπš’πš˜πš—.π™²πšžπšπ™²πš˜πš™πš’π™Όπš˜πšπšŽ = π™΅πšŠπš•πšœπšŽ πšƒπš‘πšŽπš—
π™°πš™πš™πš•πš’πšŒπšŠπšπš’πš˜πš—.π™²πšŠπš•πšŒπšžπš•πšŠπšπšŽ
π™΄πš—πš π™Έπš
π™΄πš—πš πš‚πšžπš‹

The active row and column now highlight automatically as you navigate the worksheet range.

For more Excel tips and tricks like this, check out our Video Tutorials page.

About the Author

Andrew is a technical writer who specialises in Microsoft Excel and data analysis. He has published hundreds of articles and social media posts aimed at helping people enhance their skills and spreading good practices.

Conversation

0 Comments

As you comment, let's keep the discussion friendly and respectful to add value to the conversation.

Thank you! Your comment has been sent!
Oops! Something went wrong while submitting the form.
Commenter profile pic.
Author Name
Comment Time

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere. uis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

Reply
Delete
Commenter profile pic.
Author Name
Comment Time

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere. uis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

Reply
Delete

REGISTER YOUR INTEREST

Our next event takes place in February 2025. Register your interest in attending and be the first to know when registration is live!