I know how to shade every other row in Excel but would like to swap shading after n columns.

For example in the first row cells may be (from column 1 to 6); shaded shaded shaded clear clear clear
And so on....
LVL 24
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
Hi,
You can use the below two functions in conditional formatting to get the results you want:
=ISODD(INT(SUM(ROW(),-1)/3))
=ISEVEN(INT(SUM(ROW(),-1)/3))

Check the attached file
CF_EE.xlsx
Author Commented:
Thanks abbas abdulla but that is not a solution to the question I asked. Please reread the question.....
Commented:
Can you please share a sample workbook shows what are you trying to achieve ? color it manually
Author Commented:
Here is an example:

Commented:
Check the attached again
CF_EE.xlsx
Author Commented:
That's it abbas abdulla thank you.

How do I do it?
Commented:
Dear duz,
1.      Select the range you want to apply the conditional formatting to (First Range for example A1:C2700)
2.      Go to Home Tab
3.      Click conditional formatting from the Home ribbon
4.      Choose New Rule
5.      Select the rule type "Use Formula to determine which cells to format
6.      In the formula box write this function =ISEVEN(INT(SUM(ROW(),-1)/1))
7.      Click Format button and change to the format you want
Apply same steps to do the second conditional formatting. But Range in step 1 will be D1:F2700 and function in step 6 will be =ISODD(INT(SUM(ROW(),-1)/1))
These instructions written according to excel 2013 but it should be almost the same across all versions. If you need more assistance let me know.
I wonder why you want to apply conditional formatting you can apply the formatting you want manually as well!

Experts Exchange Solution brought to you by