Skip to content
Create an Excel Macro that Highlights Rows episode artwork

May 31, 2021 5 min

Create an Excel Macro that Highlights Rows

from Technology for Teachers and Students Hosted by ytr

Learn how to create a VBA Excel Macro that will highlight every other row of whatever area of your spreadsheet that is selected. See below for the VBA code for this macro. This video is one in a series that\'s meant to help VBA macro beginners become more comfortable with creating macros. My entire playlist of Excel tutorials: http://bit.ly/tech4excel ***Consider supporting Technology for Teachers and Students on Patreon***: https://www.patreon.com/technologyforteachersandstudents Here\'s the practice file that goes with this video: http://bit.ly/excelhighlightmacro #exceltutorial #excel #excelmacros Books to help you make Excel VBA Macros: Excel VBA Programming for Dummies: https://amzn.to/3piWIZ5 Excel Power Programming with VBA: https://amzn.to/3ph323p VBA Automation for Excel: https://amzn.to/36cGPff Here\'s the VBA code for this macro: Sub HighlightEveryOtherRow() Dim Myrange As Range Dim Myrow As Range Set Myrange = Selection For Each Myrow In Myrange.Rows If Myrow.Row Mod 2 = 1 Then Myrow.Interior.Color = vbCyan End If Next Myrow End Sub

Episode details come from the podcast's RSS feed.

Embed this episode

Ready to play

Create an Excel Macro that Highlights Rows

0:00 5:27

No transcript yet.

Requests help us decide what to transcribe next.

Frequently asked questions

How long is this episode of Technology for Teachers and Students?

This episode is 5 minutes long.

When was this Technology for Teachers and Students episode published?

This episode was published on May 31, 2021.

Can I download this Technology for Teachers and Students episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.