Excel formula

is there a formula that will add like this?

A       B       C       D       E       F       G       H       i
10     20     30     40      50    60     70      80     90

and this can keep going on to the right to AN
So in AN I want to total A,D,G etc etc
in AO I want to total B,E,H etc
and in AP I want to total C,F,I etc.


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.

Glenn RayExcel VBA DeveloperCommented:
Since you're adding every third column, one can use the MOD function in combination with a SUMPRODUCT to get these results.

Assuming your original data is in cells A2:AM2, insert this formula in cell AN2 and copy to the right two cells:

or, a little more transparent:
AN2: =SUMPRODUCT(--(MOD(COLUMN($A$2:$AM$2),3)=1),$A$2:$AM$2)
AO2: =SUMPRODUCT(--(MOD(COLUMN($A$2:$AM$2),3)=2),$A$2:$AM$2)
AP2: =SUMPRODUCT(--(MOD(COLUMN($A$2:$AM$2),3)=0),$A$2:$AM$2)


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
JagwarmanAuthor Commented:
Thanks Glenn Brilliant
Glenn RayExcel VBA DeveloperCommented:
You're welcome.
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 Applications

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.