adding alternate columns

M

Mir Khan

hi experts, i need to sum the data in the alternate columns. how would i do
it...like column BL should display sum of columns B, D, F, H, J .... and
Column BM should display sum of C, E, G, I, K ....

can you please help me...
 
T

Tom Ogilvy

for B, D, F ...
BL2: =SUM(IF(MOD(COLUMN($B2:$BK2),2)=0,$B2:$BK2))

for C, E, G . . .
BM2: =SUM(IF(MOD(COLUMN($B2:$BK2),2)=1,$B2:$BK2))

each should be entered with Ctrl+Shift+enter rather than just enter since
these are array formulas.

then select BL2:BM2 and drag fill down the column.
 
B

Bob Phillips

=SUMPRODUCT(--(MOD(COLUMN($B2:$BK2),2)=0),$B2:$BK2)

and

=SUMPRODUCT(--(MOD(COLUMN($B2:$BK2),2)=1),$B2:$BK2)

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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

Top