# Excel formula

is there a formula that will add like this?

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

Possible?

Thanks
###### 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.

Excel 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:
=SUMPRODUCT(--(MOD(COLUMN(\$A\$2:\$AM\$2,3)=MOD(COLUMN(),3)),\$A\$2:\$AM\$2)

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)

Regards,
-Glenn
0

Experts Exchange Solution brought to you by

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

Author Commented:
Thanks Glenn Brilliant
0
Excel VBA DeveloperCommented:
You're welcome.
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 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.