Hello,
Wondered if someone could tell me how I can alternate the background color (fill color) of rows in a spreadsheet. Say I wanted every other row to be gray starting at row 10. Thanks much.
Hello,
Wondered if someone could tell me how I can alternate the background color (fill color) of rows in a spreadsheet. Say I wanted every other row to be gray starting at row 10. Thanks much.
Last edited by mab; 08-19-2009 at 11:04 AM.
Select the rows starting at Row 10 and go to Format|Conditional Formatting.
Select Formula Is and enter formula: =MOD(ROW(),2)=0
Click Format and choose grey from the Pattern Tab.
Click Ok
Click Ok to finish
Where there is a will there are many ways.
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
depends if you just want to colour them grey ,then colour row 10 grey select row 10 and 11 and use the fill handle in the bottom left of the first cell in row 11 and drag down(only works of course if cells are blank or youll copy all the data as well)
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and now happily retired
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
Thanks very much for the information. Could I ask a silly question - can you explain what the formula MOD(ROW(),2)=0 means and how it works?
Thanks again!
MOD() returns the remainder after number is divided by divisor
In this case the number is the current row number (Row()) and the divisor is 2...
so the answer will always be 1 or 0 depending on if you have an even or odd row number...
e.g =Mod(1,2)=1
=Mod(2,2)=0
So the conditional formula checks to see if the result of the Mod() formula is 1 or 0 and applies the formatting if the result is 0 (or even row number).
Thanks a bunch for the explanation. Have a great day!
You are quite welcome,
Please remember to mark your thread as Solved.
How to mark a thread Solved
Go to the first post
Click edit
Click Go Advanced
Just below the word Title you will see a dropdown with the word No prefix.
Change to Solved
Click Save
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks