Doua


Is there an expression syntax that will do this Does it have something to do with ROWNUMBER().

Any help is greatly appreciated! Thanks in advance! Probably an easy one for you gurus out there!




Re: Shading first 5 rows "red", then next 5 "blue", then next 5 "red", and so on...

Doua


Figured it out... thanks!

=IIF(ROWNUMBER() <= 5, "Red", IIF(ROWNUMBER()... and so on...






Re: Shading first 5 rows "red", then next 5 "blue", then next 5 "red", and so on...

Lisa Nicholls

Good one! But instead of <= you might want to try a Modulus comparison here, right, so that it will keep working without nesting IIF()s I'm thinking something like:

Code Block


= IIF(ROWNUMBER(Nothing) Mod 10 = 0 OrElse
ROWNUMBER(Nothing) Mod 10 > 5, "blue", "red")

>L<





Re: Shading first 5 rows "red", then next 5 "blue", then next 5 "red", and so on...

Doua

Can someone point me to webpage that explains all the "Mods" I've seen "Mod 2", now "Mod 10" Thanks!





Re: Shading first 5 rows "red", then next 5 "blue", then next 5 "red", and so on...

Lisa Nicholls

"all the Mods " <g>

Modulus is an arithmetic operator. It returns the remainder after a division.

So 3 Mod 2 = 1 and 7 Mod 10 = 7.

OK

>L<