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
duzAsked:
Who is Participating?
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:
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
0
duzAuthor Commented:
Thanks abbas abdulla but that is not a solution to the question I asked. Please reread the question.....
0
abbas abdullaCommented:
Can you please share a sample workbook shows what are you trying to achieve ? color it manually
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

duzAuthor Commented:
Here is an example:

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

How do I do it?
0
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!
0

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.
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.