}

Colour every second row

Need Quick Excel Help? Have a question that needs to be answered? Looking for a quick VBA code/book/  add in/or template?

Send us the quick text and we can help

A report is easier to read if every second row is shaded. However, manually shading every second row would be tedious. Instead, follow these steps:

(1) Insert a new column to the right of your data. Give it the title Temp.

(2) In the first row of data in the Temp column, enter A.

(3) In the second row of data in the Temp column, enter B.

(4) Select the two new entries and drag the fill handle down to the last row of data. Excel will create the series A, B, A, B, A, B, A, B...

(5) Select just the Temp column and switch on the AutoFilter. In Excel 2000/XP/2003, choose Data | Filter | AutoFilter. In Excel 2007 choose, Data | Sort & Filter | Filter (Alt + AT).

(6) Click on the drop-down arrow for the Temp column and select A. The filter hides every second row (all those that contain B).

(7) Select the visible rows and change the fill to the desired colour. (Use the paint-can icon on the Formatting toolbar to do this quickly).

(8) Delete the Temp column. This will also remove the AutoFilter.

eXTReMe Tracker