How to create excel macro to color every second row
Here is a excel tip to automatically color every second row with a macro. If you often color lists to increase sheet readability, this tutorial can be valuable.
If you are an Excel 2007 user, you can create a table of your list to color every second row quickly. Read more about tables in Excel Help.
How to create macro in Excel 2007
Enable developer tab in ribbon:
- Press Office button
- Click Excel options
- Click Popular
- Click "Show developer tab in ribbon"
- Click OK!
Create macro
- Go to developer tab in ribbon
- Click Record Macro
- Type a macro name
- Click OK
- Click "Home" tab
- Click "Conditional formatting"
- Click "New rule..."
- Click "Use a formula to determine which cells to format"
- Type =ISEVEN(ROW()) in formula field

- Click Format button
- Click "Fill" tab
- Select a color
- Click OK
- Click OK
- Go to developer tab in ribbon
- Click Stop Macro
How to use your new macro
- Select cell range you want to color
- Go to developer tab in ribbon
- Click "Macros"
- Select macro
- Click Run
Functions in this article:
ROW(reference) Returns the rownumber of a reference
ISEVEN(number) Returns TRUE if the number is even
Related posts:


Leave a Reply