shading alternate rows, but losing format when one row is deleted

C

Candice

I have my sheet rows shaded alternately gray/white, but when I delete a row,
the shading does not update, I have to re-format manually....
I wrote a macro: select all > autoformat >
and that works, but I am wondering if there is a setting that will just
auto adjust the row shading after I delete or ad a row without having
to run the macro or re-auto format?
Any suggestions will be greatly appreciated.
Thanks, Candice
 
G

Gord Dibben

Candice

Select all rows.

Format>Conditional Formatting>Formula is: =MOD(ROW(),2)=1

Pick a pattern from Format and OK your way out.


Gord Dibben MS Excel MVP
 
R

Ragdyer

You can use "Conditional Formatting", which will self-adjust after rows are
inserted or deleted.

Select the range (or all),
Then
<Format> <Conditional Format>
Select "Formula Is" in the first box drop-down,
Enter this formula in the next box:

=MOD(ROW(),2)=0

Click "Format" and choose a 'Pattern' color to your liking (Gray),
Then <OK> <OK>

Now, all *even* rows are colored.

To have *odd* rows colored, change formula to:

=MOD(ROW(),2)
 
C

Candice

THANK YOU!!!!

Gord Dibben said:
Candice

Select all rows.

Format>Conditional Formatting>Formula is: =MOD(ROW(),2)=1

Pick a pattern from Format and OK your way out.


Gord Dibben MS Excel MVP
 
W

waddsn1060

I am trying to do the same thing but when I enter either:

=MOD(ROW(),2)=0 or =MOD(ROW()-Rw,N*2)+1>N

Into the conditional formatting box, nothing happens. I can go back
into conditional formatting and it will say Formula is =MOD(ROW(),2)=0
or =MOD(ROW()-Rw,N*2)+1>N with my settings.

Help!
 
R

Ragdyer

Are you selecting a *range* BEFORE you click into "Conditional Formatting"?

Are you choosing a *pattern* color AFTER you enter your formula?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top