Jack,
Could I suggest conditional formatting?
Select all the rows to apply to, including the in -between non-coloured
rows.
Goto menu FormatConditional Formatting
Change Condition 1 to FoprmulaIs
Input a formula of =MOD(ROW(),$A$1)=$B$1
Click the Format button
Select the pattern tab
Choose a colour
OK
OK
A1 holds the set size (your 4,17), and B1 is the row within that set to
colour. So A1=4, B1=2 will colour row, 6, etc. A1=3, B1 =1 colours 1,4,7.
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"jack27" wrote in message
...
Does anyone know how i can create a macro that will allow me to color
every 'nth' row? I'm thinking a box would pop up asking which row to
color, ie if i wanted to color every fourth row i'd enter 4, if iwanted
to color every 17th row i'd enter 17 etc... and on clicking OK the
backgroud color of the respective rows would change color?
Any ideas?
------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/
~~Now Available: Financial Statements.xls, a step by step guide to
creating financial statements