Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 60
Default Alternate Row Shading (Visible Rows Only)

Quick question..... hopefully it is possible.

To have alternate row shading in XL2003 and earlier the conditional
formatting formula would be =MOD(ROW(),2)
This works find until I start hiding rows.....

Is there a way to have alternate row shading on visible rows?

This is so that I can retain the alternate row shading even if I start
to hide rows.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Alternate Row Shading (Visible Rows Only)

Have a look here

http://www.contextures.com/xlCondFormat03.html#Shade

Mike

"Forgone" wrote:

Quick question..... hopefully it is possible.

To have alternate row shading in XL2003 and earlier the conditional
formatting formula would be =MOD(ROW(),2)
This works find until I start hiding rows.....

Is there a way to have alternate row shading on visible rows?

This is so that I can retain the alternate row shading even if I start
to hide rows.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Alternate Row Shading (Visible Rows Only)

Hi,

Assume your data is arranged like this in range A2:B10.

Name Amount
A 10
S 12
D 14
F 16
G 18
T 20
Y 22
U 24

Now in C2, enter the following formula =SUBTOTAL(103,$B$3:B3). Copy this
down till C10. Now while in cell B3, enter the following formula in Format
Conditional formatting =MOD($C3,2)=0. Select the format desired. Now

copy this conditional format down.

Try hiding rows now. You will mow notice that every even numbered row which
is visible, will be in the desired format.

Please let me know how this works for you. Also, please note that this
method will only work in Excel 203 and above. SUMPRODUCT(100 series ....)
is only available in Excel 2003 and above.

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Forgone" wrote in message
...
Quick question..... hopefully it is possible.

To have alternate row shading in XL2003 and earlier the conditional
formatting formula would be =MOD(ROW(),2)
This works find until I start hiding rows.....

Is there a way to have alternate row shading on visible rows?

This is so that I can retain the alternate row shading even if I start
to hide rows.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Alternate Row Shading (Visible Rows Only)

Hi Ashish

I don't think this works in the manner required
If you don't bother with formulae in column C, but just set the Conditional
Formatting formula to
=MOD(SUBTOTAL(103,$B$2:B2),2)=0
then it will work.
--
Regards
Roger Govier

"Ashish Mathur" wrote in message
...
Hi,

Assume your data is arranged like this in range A2:B10.

Name Amount
A 10
S 12
D 14
F 16
G 18
T 20
Y 22
U 24

Now in C2, enter the following formula =SUBTOTAL(103,$B$3:B3). Copy this
down till C10. Now while in cell B3, enter the following formula in
Format
Conditional formatting =MOD($C3,2)=0. Select the format desired. Now

copy this conditional format down.

Try hiding rows now. You will mow notice that every even numbered row
which is visible, will be in the desired format.

Please let me know how this works for you. Also, please note that this
method will only work in Excel 203 and above. SUMPRODUCT(100 series ....)
is only available in Excel 2003 and above.

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Forgone" wrote in message
...
Quick question..... hopefully it is possible.

To have alternate row shading in XL2003 and earlier the conditional
formatting formula would be =MOD(ROW(),2)
This works find until I start hiding rows.....

Is there a way to have alternate row shading on visible rows?

This is so that I can retain the alternate row shading even if I start
to hide rows.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Alternate Row Shading (Visible Rows Only)

Dear Roger,

I guess both of us are saying the same thing. It's just that I used spare
column which could have been avoided.

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Roger Govier" <roger@technology4unospamdotcodotuk wrote in message
...
Hi Ashish

I don't think this works in the manner required
If you don't bother with formulae in column C, but just set the
Conditional Formatting formula to
=MOD(SUBTOTAL(103,$B$2:B2),2)=0
then it will work.
--
Regards
Roger Govier

"Ashish Mathur" wrote in message
...
Hi,

Assume your data is arranged like this in range A2:B10.

Name Amount
A 10
S 12
D 14
F 16
G 18
T 20
Y 22
U 24

Now in C2, enter the following formula =SUBTOTAL(103,$B$3:B3). Copy this
down till C10. Now while in cell B3, enter the following formula in
Format
Conditional formatting =MOD($C3,2)=0. Select the format desired. Now

copy this conditional format down.

Try hiding rows now. You will mow notice that every even numbered row
which is visible, will be in the desired format.

Please let me know how this works for you. Also, please note that this
method will only work in Excel 203 and above. SUMPRODUCT(100 series
....) is only available in Excel 2003 and above.

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Forgone" wrote in message
...
Quick question..... hopefully it is possible.

To have alternate row shading in XL2003 and earlier the conditional
formatting formula would be =MOD(ROW(),2)
This works find until I start hiding rows.....

Is there a way to have alternate row shading on visible rows?

This is so that I can retain the alternate row shading even if I start
to hide rows.




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 60
Default Alternate Row Shading (Visible Rows Only)

As I'm applying it to a range of cells, I made a slight
modification....

=MOD(SUBTOTAL(102,$B$2:$B2),2)=0



On Sep 16, 4:17*pm, "Roger Govier"
<roger@technology4unospamdotcodotuk wrote:
Hi Ashish

I don't think this works in the manner required
If you don't bother with formulae in column C, but just set the Conditional
Formatting formula to
=MOD(SUBTOTAL(103,$B$2:B2),2)=0
then it will work.
--
Regards
Roger Govier

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Alternate Row Shading (Visible Rows Only)

102 is COUNT which will count numerics only.

Is that what you want?

103 counts everything.


Gord Dibben MS Excel MVP


On Tue, 16 Sep 2008 18:44:57 -0700 (PDT), Forgone
wrote:

As I'm applying it to a range of cells, I made a slight
modification....

=MOD(SUBTOTAL(102,$B$2:$B2),2)=0



On Sep 16, 4:17*pm, "Roger Govier"
<roger@technology4unospamdotcodotuk wrote:
Hi Ashish

I don't think this works in the manner required
If you don't bother with formulae in column C, but just set the Conditional
Formatting formula to
=MOD(SUBTOTAL(103,$B$2:B2),2)=0
then it will work.
--
Regards
Roger Govier


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 60
Default Alternate Row Shading (Visible Rows Only)

Typing error.......

It's =MOD(SUBTOTAL(103,$B$2:$B2),2)=0

I had to put a dollar sign in front of the second B and it works a
treat!


On Sep 18, 5:24*am, Gord Dibben <gorddibbATshawDOTca wrote:
102 is COUNT which will count numerics only.

Is that what you want?

103 counts everything.

Gord Dibben *MS Excel MVP

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Alternate Row Shading (Visible Rows Only)

Hi
Only just seen your responses in this thread.
My apologies for omitting the $ on the second occurrence of B.
Glad you got that worked out for yourself.

--
Regards
Roger Govier

"Forgone" wrote in message
...
Typing error.......

It's =MOD(SUBTOTAL(103,$B$2:$B2),2)=0

I had to put a dollar sign in front of the second B and it works a
treat!


On Sep 18, 5:24 am, Gord Dibben <gorddibbATshawDOTca wrote:
102 is COUNT which will count numerics only.

Is that what you want?

103 counts everything.

Gord Dibben MS Excel MVP


  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 60
Default Alternate Row Shading (Visible Rows Only)

Because I've got multiple ranges (financial report) with a series of
spaces and totals in between each "category" I've had to enter the
formula into each group manually as the "copy paste special
formats" or using the format painter doesn't help out as much because
of the $A$1 reference. Oh well...... it is a tedious job....
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
Shading alternate "groups" of rows? Lee Harris Excel Worksheet Functions 6 September 17th 06 03:43 PM
Alternate shading colors tjsmags Excel Discussion (Misc queries) 2 September 4th 06 02:49 PM
Conditional Formatting Shading For Visible Rows Only manda Excel Discussion (Misc queries) 3 May 22nd 06 10:42 PM
shading alternate rows, but losing format when one row is deleted Candice Excel Discussion (Misc queries) 8 May 11th 06 04:01 AM
Alternate Shading tamiluchi Excel Discussion (Misc queries) 9 April 28th 06 08:55 PM


All times are GMT +1. The time now is 03:33 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"