Highlighting Rows by Criteria

  • Thread starter Thread starter WBTKbeezy
  • Start date Start date
W

WBTKbeezy

Hello:

I am trying to highlight a table in a certain way. I need 3 rows to be
colored then next 3 white, the next 3 colored, the next three white, etc...
I have checked out http://xldynamic.com/source/xld.CF.html , but I couldn't
quite modify what it was doing for what I need, I don't want every other
highlighted, but I need 3 on 3 off... Can someone provide assistance?

Thanks.
 
Hi, Try putting this formula into the conditional formatting of all the cells
of the range you want highlighted:

First select "Formula Is"

=OR(MOD(ROW(),6)=1,MOD(ROW(),6)=2,MOD(ROW(),6)=3)
Then set your formatting.

Regards - Dave.
 
Hello:

I am trying to highlight a table in a certain way. I need 3 rows to be
colored then next 3 white, the next 3 colored, the next three white, etc...
I have checked out http://xldynamic.com/source/xld.CF.html , but I couldn't
quite modify what it was doing for what I need, I don't want every other
highlighted, but I need 3 on 3 off... Can someone provide assistance?

Thanks.


Try this:

=MOD(ROW()-1+n,m+n)=MOD(n,m+n)

this is TRUE for the m first rows and then FALSE for the next n rows
and so on.

For your case use m=3 and n=3. Change the -1 if your table doesn't
start at row number 1.

Hope this helps. / Lars-Åke
 
WBTKbeezy;654549 said:
Hello:

I am trying to highlight a table in a certain way. I need 3 rows to b

colored then next 3 white, the next 3 colored, the next three white
etc...
I have checked out http://xldynamic.com/source/xld.CF.html , but
couldn't
quite modify what it was doing for what I need, I don't want ever
other
highlighted, but I need 3 on 3 off... Can someone provide assistance?

Thanks.

This should do it.

Code
 
Back
Top