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:

  1. Press Office button
  2. Click Excel options
  3. Click Popular
  4. Click "Show developer tab in ribbon"
  5. Click OK!

Create macro

  1. Go to developer tab in ribbon
  2. Click Record Macro
  3. Type a macro name
  4. Click OK
  5. Click "Home" tab
  6. Click "Conditional formatting"
  7. Click "New rule..."
  8. Click "Use a formula to determine which cells to format"
  9. Type =ISEVEN(ROW()) in formula fieldcolor-even-row
  10. Click Format button
  11. Click "Fill" tab
  12. Select a color
  13. Click OK
  14. Click OK
  15. Go to developer tab in ribbon
  16. Click Stop Macro

How to use your new macro

  1. Select cell range you want to color
  2. Go to developer tab in ribbon
  3. Click "Macros"
  4. Select macro
  5. Click Run

Functions in this article:

ROW(reference) Returns the rownumber of a reference

ISEVEN(number) Returns TRUE if the number is even

  • Share/Bookmark

Related posts:

  1. Color every second row using dynamic conditional formatting in excel
  2. Insert a new row at the top every time a value has been entered
  3. How to color every cell in excel
  4. Create a dynamic stock chart using a web query and a drop down list in excel
  5. Create a dynamic border to your list using excel conditional formatting
  6. Create a unique distinct list of a long list without sacrificing performance using vba in excel
  7. How to create a unique list using conditional formatting in excel 2007
  8. Highlight dates within a date range using conditional formatting
  9. Prevent duplicates using dynamic conditional formatting in excel
  10. Highlight the second or more duplicates in two lists using conditional formatting in excel