add or subtract every 5th column

B

bwilde

i have a spread sheet and want a running total based on values in every 5th &
7th cell for the entire row.
now my formula is =A3+M3+S3+Y3+AE3+AK3-L3-R3-X3-AD3-AJ3 I want to continue
to (or redo the formula) add every 5th cell and subtract every 7th cell
without having to select each one
 
J

Jacob Skaria

Try the below...

=A3+SUMPRODUCT((MOD(COLUMN(L3:IV3),6)=1)*(L3:IV3))-
SUMPRODUCT((MOD(COLUMN(L3:IV3),6)=0)*(L3:IV3))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top