Friday, January 20, 2012

yogi_How To Color Odd And Even Rows Of A Sheet


Yogi Anand, D.Eng, P.E.                                         Google Spreadsheet                            www.energyefficientbuild.com
Let us say we want to color all even rows as gray, and all odd rows light brown then 
1.1) use the following formula in cell A1:
       =ArrayFormula(mod(row(YY:YY),2))
1.2) use the FILTER command to select all rows in column A for 0
     or optionally just select all the rows            
1.3) with all rows selected, change the background color to gray
and now to color all odd rows as light brown
2.1) remove the FILTER if you used one earlier
2.2) use the FILTER command to select all rows in column A for 1
3.1) with all rows selected, change the background color to light brown
on removing the filter, all even rows are colored gray and all even rows are colored light brown
now select column A and clear the contents of column A
-------------------------------------------------

No comments:

Post a Comment