ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Change even rows to a predefined colour (https://www.excelbanter.com/excel-programming/325489-change-even-rows-predefined-colour.html)

Pat

Change even rows to a predefined colour
 
I want to run code that will change even numbered rows to a predefined
colour in the range 10:100

Any suggestions?

thank you
Pat



Bob Phillips[_6_]

Change even rows to a predefined colour
 
Pat,

Take a look at http://www.xldynamic.com/source/xld.CF.html#rows

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Pat" wrote in message
...
I want to run code that will change even numbered rows to a predefined
colour in the range 10:100

Any suggestions?

thank you
Pat





JMay

Change even rows to a predefined colour
 
Click in the row-header of Row 10. The entire Row (10) should be selected.
At the Menu, Click on Format, Conditional Formatting;
At drop down select FormulaIS and in the box put in:
=IF(MOD(ROW(),2)=0,TRUE) - then select your color, and then OK out.
Your Row 10 should change immediately to the desired color.
Now Click again in the Row Header of Row 10;
At the Menu Click on the Format-Painter (the Paint-Brush Icon) then
left click and hold down on the row header of Row 11 and drag down the
Row header Column to Row 100 and let go of your Mouse;
Done
HTH



"Pat" wrote in message
...
I want to run code that will change even numbered rows to a predefined
colour in the range 10:100

Any suggestions?

thank you
Pat





Bob Phillips[_6_]

Change even rows to a predefined colour
 
Hi Jim,

You don't need to do an IF test. CF only wants a TRUE or FALSE to determine
whether to set the format, and the expression

=MOD(ROW(),2)=0

returns TRUE or FALSE, so that is sufficient.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"JMay" wrote in message
news:VcKZd.86693$%U2.35857@lakeread01...
Click in the row-header of Row 10. The entire Row (10) should be selected.
At the Menu, Click on Format, Conditional Formatting;
At drop down select FormulaIS and in the box put in:
=IF(MOD(ROW(),2)=0,TRUE) - then select your color, and then OK out.
Your Row 10 should change immediately to the desired color.
Now Click again in the Row Header of Row 10;
At the Menu Click on the Format-Painter (the Paint-Brush Icon) then
left click and hold down on the row header of Row 11 and drag down the
Row header Column to Row 100 and let go of your Mouse;
Done
HTH



"Pat" wrote in message
...
I want to run code that will change even numbered rows to a predefined
colour in the range 10:100

Any suggestions?

thank you
Pat







Jim May

Change even rows to a predefined colour
 
Yeah, Thanks Bob
Hopefully I can remember that TRUTH.
Jim

"Bob Phillips" wrote in message
...
Hi Jim,

You don't need to do an IF test. CF only wants a TRUE or FALSE to

determine
whether to set the format, and the expression

=MOD(ROW(),2)=0

returns TRUE or FALSE, so that is sufficient.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"JMay" wrote in message
news:VcKZd.86693$%U2.35857@lakeread01...
Click in the row-header of Row 10. The entire Row (10) should be

selected.
At the Menu, Click on Format, Conditional Formatting;
At drop down select FormulaIS and in the box put in:
=IF(MOD(ROW(),2)=0,TRUE) - then select your color, and then OK out.
Your Row 10 should change immediately to the desired color.
Now Click again in the Row Header of Row 10;
At the Menu Click on the Format-Painter (the Paint-Brush Icon) then
left click and hold down on the row header of Row 11 and drag down the
Row header Column to Row 100 and let go of your Mouse;
Done
HTH



"Pat" wrote in message
...
I want to run code that will change even numbered rows to a predefined
colour in the range 10:100

Any suggestions?

thank you
Pat










All times are GMT +1. The time now is 07:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com