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:
- Color every second row using dynamic conditional formatting in excel
- Insert a new row at the top every time a value has been entered
- How to color every cell in excel
- Create a dynamic stock chart using a web query and a drop down list in excel
- Create a dynamic border to your list using excel conditional formatting
- Create a unique distinct list of a long list without sacrificing performance using vba in excel
- How to create a unique list using conditional formatting in excel 2007
- Highlight dates within a date range using conditional formatting
- Prevent duplicates using dynamic conditional formatting in excel
- Highlight the second or more duplicates in two lists using conditional formatting in excel


Leave a Reply