Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 367
Default Macro To Shade Every Other Row

I have the following Range: "A10:Z2000". I am trying to figure out some
code that would allow me to begin with row 10 within the range, and highlight
every other row with a light shade of grey until it reaches the end of the
range. Some of the cells will have other formats in place (Number,
Percentage, etc), so I would want the shading to occur with the existing
formats remaining in place. Can anyone help. Thanks.

Jason
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Macro To Shade Every Other Row

Don Guillett wrote:
Without a macro, use conditional
formattingcondition1=mod(row(),2)=0format patterns graycopy the
format. easier when you add and delete

See also Chip's excellent page on "color banding":
http://www.cpearson.com/excel/banding.htm


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Macro To Shade Every Other Row

One way to make your data legible is to apply cell shading to every
other row in a range. Excel's Conditional Formatting feature
(available in Excel or later) makes this a simple task.

Select the range that you want to format

Choose Format, Conditional Formatting

In the Conditional Formatting dialog box, select Formula Is from the
drop-down list, and enter this formula:

=MOD(ROW(),2)=0.

Click the Format button, select the Patterns tab, and specify a color
for the shaded rows.

Click OK twice to return to your worksheet.

The best part is that the row shading is dynamic. You'll find that the
row shading persists even if you insert or delete rows within the
original range.

"Don Guillett" wrote in message ...
Without a macro, use conditional
formattingcondition1=mod(row(),2)=0format patterns graycopy the format.
easier when you add and delete


--
Don Guillett
SalesAid Software

"Jason" wrote in message
...
I have the following Range: "A10:Z2000". I am trying to figure out some
code that would allow me to begin with row 10 within the range, and

highlight
every other row with a light shade of grey until it reaches the end of the
range. Some of the cells will have other formats in place (Number,
Percentage, etc), so I would want the shading to occur with the existing
formats remaining in place. Can anyone help. Thanks.

Jason

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Macro To Shade Every Other Row

One way to make your data legible is to apply cell shading to every
other row in a range. Excel's Conditional Formatting feature
(available in Excel or later) makes this a simple task.

Select the range that you want to format

Choose Format, Conditional Formatting

In the Conditional Formatting dialog box, select Formula Is from the
drop-down list, and enter this formula:

=MOD(ROW(),2)=0.

Click the Format button, select the Patterns tab, and specify a color
for the shaded rows.

Click OK twice to return to your worksheet.

The best part is that the row shading is dynamic. You'll find that the
row shading persists even if you insert or delete rows within the
original range.
"Don Guillett" wrote in message ...
Without a macro, use conditional
formattingcondition1=mod(row(),2)=0format patterns graycopy the format.
easier when you add and delete


--
Don Guillett
SalesAid Software

"Jason" wrote in message
...
I have the following Range: "A10:Z2000". I am trying to figure out some
code that would allow me to begin with row 10 within the range, and

highlight
every other row with a light shade of grey until it reaches the end of the
range. Some of the cells will have other formats in place (Number,
Percentage, etc), so I would want the shading to occur with the existing
formats remaining in place. Can anyone help. Thanks.

Jason



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Macro To Shade Every Other Row

You answered what I said with what I said?

--
Don Guillett
SalesAid Software

"Dsuperc" wrote in message
om...
One way to make your data legible is to apply cell shading to every
other row in a range. Excel's Conditional Formatting feature
(available in Excel or later) makes this a simple task.

Select the range that you want to format

Choose Format, Conditional Formatting

In the Conditional Formatting dialog box, select Formula Is from the
drop-down list, and enter this formula:

=MOD(ROW(),2)=0.

Click the Format button, select the Patterns tab, and specify a color
for the shaded rows.

Click OK twice to return to your worksheet.

The best part is that the row shading is dynamic. You'll find that the
row shading persists even if you insert or delete rows within the
original range.

"Don Guillett" wrote in message

...
Without a macro, use conditional
formattingcondition1=mod(row(),2)=0format patterns graycopy the

format.
easier when you add and delete


--
Don Guillett
SalesAid Software

"Jason" wrote in message
...
I have the following Range: "A10:Z2000". I am trying to figure out

some
code that would allow me to begin with row 10 within the range, and

highlight
every other row with a light shade of grey until it reaches the end of

the
range. Some of the cells will have other formats in place (Number,
Percentage, etc), so I would want the shading to occur with the

existing
formats remaining in place. Can anyone help. Thanks.

Jason



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
shade one cell that will shade multiple cells Walt Excel Discussion (Misc queries) 1 November 17th 09 03:46 PM
add days and shade help bikerhd New Users to Excel 3 December 3rd 06 06:25 PM
shade cells superkopite Excel Discussion (Misc queries) 11 January 21st 06 10:33 PM
How to shade every third row? jy Excel Discussion (Misc queries) 10 May 20th 05 02:32 AM
Shade Every Other Row danpajo Excel Discussion (Misc queries) 2 January 14th 05 09:23 PM


All times are GMT +1. The time now is 10:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"