ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Excell 2000 worksheet (https://www.excelbanter.com/excel-worksheet-functions/22323-excell-2000-worksheet.html)

KRM

Excell 2000 worksheet
 
how may I devise a formula for adding only alternate cells in columns?

Bob Phillips

Even rows: =SUMPRODUCT(--(MOD(ROW(B1:B30),2)=0),B1:B30)
Odd rows; =SUMPRODUCT(--(MOD(ROW(B1:B30),2)=1),B1:B30)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"KRM" wrote in message
...
how may I devise a formula for adding only alternate cells in columns?




Harlan Grove

"Bob Phillips" wrote...
Even rows: =SUMPRODUCT(--(MOD(ROW(B1:B30),2)=0),B1:B30)
Odd rows; =SUMPRODUCT(--(MOD(ROW(B1:B30),2)=1),B1:B30)


Yes, but if you had the sum of even rows in, say, X99, then it'd be more
efficient to calculate the sum of odd rows using

=SUM(B1:B30)-X99



Bob Phillips

True, but he asked for summing alternate rows without saying whether he
wanted odd or even, so I gave him both. He did not say he wanted two sums,.

Bob

"Harlan Grove" wrote in message
...
"Bob Phillips" wrote...
Even rows: =SUMPRODUCT(--(MOD(ROW(B1:B30),2)=0),B1:B30)
Odd rows; =SUMPRODUCT(--(MOD(ROW(B1:B30),2)=1),B1:B30)


Yes, but if you had the sum of even rows in, say, X99, then it'd be more
efficient to calculate the sum of odd rows using

=SUM(B1:B30)-X99





Aladin Akyurek

KRM wrote:
how may I devise a formula for adding only alternate cells in columns?


=SUMPRODUCT(--(MOD(ROW(A3:A8)-ROW($A$3)+0,2)=0),A3:A8)

Replace the +0 bit with +1 if summing must start with the first 2nd value.

Note that 2 (the Nth row parameter) can be any admissible value, odd or
even.

KRM

I'm grateful to you for this help. I'd never have got it by myself. Thanks,
KRM

"Harlan Grove" wrote:

"Bob Phillips" wrote...
Even rows: =SUMPRODUCT(--(MOD(ROW(B1:B30),2)=0),B1:B30)
Odd rows; =SUMPRODUCT(--(MOD(ROW(B1:B30),2)=1),B1:B30)


Yes, but if you had the sum of even rows in, say, X99, then it'd be more
efficient to calculate the sum of odd rows using

=SUM(B1:B30)-X99




KRM

I'm grateful to you for this help. I'd never have got it by myself. Thanks,
KRM

"Bob Phillips" wrote:

Even rows: =SUMPRODUCT(--(MOD(ROW(B1:B30),2)=0),B1:B30)
Odd rows; =SUMPRODUCT(--(MOD(ROW(B1:B30),2)=1),B1:B30)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"KRM" wrote in message
...
how may I devise a formula for adding only alternate cells in columns?





KRM

I'll bet that's a great solution but it's like a PHD coaching a
kindergardener. Many thanks anyway. KRM

"Aladin Akyurek" wrote:

KRM wrote:
how may I devise a formula for adding only alternate cells in columns?


=SUMPRODUCT(--(MOD(ROW(A3:A8)-ROW($A$3)+0,2)=0),A3:A8)

Replace the +0 bit with +1 if summing must start with the first 2nd value.

Note that 2 (the Nth row parameter) can be any admissible value, odd or
even.



All times are GMT +1. The time now is 04:50 AM.

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