Sum every other column

  • Thread starter Thread starter GerryK
  • Start date Start date
G

GerryK

Hi,
I'm miffed, I cannot get this to work;
In G3 with data in row 3 (H3 on)
=SUMPRODUCT((MOD(COLUMN($H$3:INDEX(1:1,28))-CELL
("Col",$H$3)+0,2)=0)*($H$3:INDEX(1:1,28)))

But these work!
In A3 with data in row 1 (A1 on)
=SUMPRODUCT((MOD(COLUMN($A$1:INDEX(1:1,12))-CELL
("Col",$A$1)+0,2)=0)*($A$1:INDEX(1:1,12)))
In A7 with same data in row 1 (A1 on)
=SUMPRODUCT((MOD(COLUMN($B$2:INDEX(1:1,12))-CELL
("Col",$B$2)+0,2)=0)*($B$2:INDEX(1:1,12)))

Could someone help me out!

TIA
Gerry
 
Are you summing every other column and you start with H3 then J3 and so on,
if that's the case

=SUMPRODUCT(--(MOD(COLUMN(H3:IV3),2)=0),H3:IV3)
 
Gerry,

You need also to adjust the row specifying expression...

=SUMPRODUCT((MOD(COLUMN($H$3:INDEX(3:3,28))-CELL("Col",$H$3)+0,2)=0)*($H$3:I
NDEX(3:3,28)))

or, in case of text-values in the range to sum...

=SUMPRODUCT(--(MOD(COLUMN($H$3:INDEX(3:3,28))-CELL("Col",$H$3)+0,2)=0),$H$3:
INDEX(3:3,28))

Aladin
 
Back
Top