Shading of rows

S

STS

Hi,

How can I shade multiple rows at the same time, for example all odd row
numbers in gray, all even numbers in blue? I am sure there is a better way of
doing it than manualy row by row. Thank you for your help.
 
T

T. Valko

Try this...

Assume the range of interest is A1:E5

Select the range A1:E5
Goto Format>Conditional Formatting

Condition 1
Formula Is: =MOD(ROW(),2)>0
Click the Format button
Select the Patterns tab
Select a gray fill
OK

Click the Add button

Condition 2
Formula Is: =MOD(ROW(),2)=0
Click the Format button
Select the Patterns tab
Select a blue fill
OK out
 
T

Teethless mama

Conditional Formatting

Condition1: For odd rows
=MOD(ROW(),2)=1

Condition2: For even rows
=MOD(ROW(),2)=0

Format any color you like
 
G

Gord Dibben

If you want the row banding to remain through filtering use this formula where
the others have showed you.

=MOD(SUBTOTAL(3,$A1:$A$2),2)=0


Gord Dibben MS Excel MVP
 
S

STS

Thank you, it works.

T. Valko said:
Try this...

Assume the range of interest is A1:E5

Select the range A1:E5
Goto Format>Conditional Formatting

Condition 1
Formula Is: =MOD(ROW(),2)>0
Click the Format button
Select the Patterns tab
Select a gray fill
OK

Click the Add button

Condition 2
Formula Is: =MOD(ROW(),2)=0
Click the Format button
Select the Patterns tab
Select a blue fill
OK out
 
S

STS

Thank you, works great.


Teethless mama said:
Conditional Formatting

Condition1: For odd rows
=MOD(ROW(),2)=1

Condition2: For even rows
=MOD(ROW(),2)=0

Format any color you like
 
G

Gord Dibben

Did you try filtering your data after entering the CF per Biff's instructions?


Gord
 

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