ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   add or subtract every 5th column (https://www.excelbanter.com/excel-discussion-misc-queries/257356-add-subtract-every-5th-column.html)

bwilde

add or subtract every 5th column
 
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

Jacob Skaria

add or subtract every 5th column
 
Try the below...

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

--
Jacob


"bwilde" wrote:

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


bwilde

add or subtract every 5th column
 
thanks - busy now i'll try it later or tomorrow and let you know

"Jacob Skaria" wrote:

Try the below...

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

--
Jacob


"bwilde" wrote:

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



All times are GMT +1. The time now is 05:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com