ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   use of sum by skiping one or more cells (https://www.excelbanter.com/excel-discussion-misc-queries/4496-use-sum-skiping-one-more-cells.html)

Faisal Yameen

use of sum by skiping one or more cells
 
I want to sum only even cells from A1: A1000
I used =a2+a4+a6+a8+€¦€¦€¦€¦..+a1000
Used this formula n cell b1
But now I want to solve this problem by some short formula
Help me thank you



Bob Phillips

Hi Faisal,

Try this

=SUM((A1:A1000)*(MOD(ROW(INDIRECT("1:1000")),2)=0) )

it is an array formula, so commit with Ctrl-Shift-Delete

--
HTH

Bob Phillips

"Faisal Yameen" wrote in message
...
I want to sum only even cells from A1: A1000
I used =a2+a4+a6+a8+......+a1000
Used this formula n cell b1
But now I want to solve this problem by some short formula
Help me thank you





Aladin Akyurek

=SUMPRODUCT(--(MOD(ROW(A2:A1000)-CELL("Row",A2)+0,2)=0),A2:A1000)

+0 means starting with A2. When changed to +1, it will sum from the
first 2nd on.

Faisal Yameen wrote:
I want to sum only even cells from A1: A1000
I used =a2+a4+a6+a8+€¦€¦€¦€¦..+a1000
Used this formula n cell b1
But now I want to solve this problem by some short formula
Help me thank you




All times are GMT +1. The time now is 01:21 PM.

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