Row shading

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
The second row; clear clear clear shaded shaded shaded
The third row; shaded shaded shaded clear clear clear
And so on....
LVL 24
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

abbas abdullaCommented:
You can use the below two functions in conditional formatting to get the results you want:

Check the attached file
duzAuthor Commented:
Thanks abbas abdulla but that is not a solution to the question I asked. Please reread the question.....
abbas abdullaCommented:
Can you please share a sample workbook shows what are you trying to achieve ? color it manually
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

duzAuthor Commented:
Here is an example:

Excel image
abbas abdullaCommented:
Check the attached again
duzAuthor Commented:
That's it abbas abdulla thank you.

How do I do it?
abbas abdullaCommented:
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

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
duzAuthor Commented:
Thank you, much appreciated.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.