Alternate Row Coloring

N

Ned

Hi, I came accross a formula that can be used as a condition in
Conditional Formatting for Alternate Row Coloring. The formula is "
=AND(MOD(ROW(),2),COUNTA($A1:$C1)) ". Now this formula works really
nice, however it is only limited to one color condition for example
"Yellow", while the second color remains as the background color
example "White". If I want to add a second color other than "White"
say "Red" what change do I need to make to the above formula so that I
can insert it as a 2nd condition in the Conditional formatting. So
that I can have Yellow and Red alternating

Appreciate any help. Thankyou

Ed
 
S

Stefi

=MOD(ROW(),2) for yellow
=NOT(AND(MOD(ROW(),2)) for red

The second condition COUNTA($A1:$C1) limits the scope of CF to rows in which
one of cells A:C are not blank.

--
Regards!
Stefi



„Ned†ezt írta:
 
×

מיכ×ל (מיקי) ×בידן

I believe you left out one right bracket and I think that:
=MOD(ROW(),0) will also produce the RED background.
Micky
 
D

David Biddulph

Or the same without the AND?
--
David Biddulph

Stefi said:
=MOD(ROW(),2) for yellow
=NOT(AND(MOD(ROW(),2)) for red

The second condition COUNTA($A1:$C1) limits the scope of CF to rows in
which
one of cells A:C are not blank.

--
Regards!
Stefi



"Ned" ezt írta:
 
×

מיכ×ל (מיקי) ×בידן

Ignore my CF formula.
Micky


מיכ×ל (מיקי) ×בידן said:
I believe you left out one right bracket and I think that:
=MOD(ROW(),0) will also produce the RED background.
Micky
 
S

Stefi

Of course, I forgot to delete it, thank you for the warning!

--
Regards!
Stefi



„David Biddulph†ezt írta:
 
×

מיכ×ל (מיקי) ×בידן

In your case - you may also consider to format ALL rows in one of the colors
and use only ONE CF coloring for the ODD or EVEN rows.
Micky
 

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