Excel

Associate
Joined
29 Dec 2004
Posts
159
Hi I am trying to find out how to write an excel formula to count the values in every other column like =Sum(A1:A3:A5) but make it keep going without having to alter it for every extra column.

Any ideas?
 
have a look at this for an idea how to do it... the example uses Excel 2003, if you have Excel 2007/2010, I would use a SUMIF() statement instead.
 
Just had a quick look at this and the following formula worked for me:

=SUM(IF(ISEVEN(COLUMN(A1:Z1)),A1:Z1,""))

It is an array formula so rather than pasting it onto a cell directly you will need to paste it into the formula bar then hit CTRL+SHIFT+ENTER

Z1 in the formula is the right-most column in the sum. To calculate all possible columns substitute the two Z1s for IV1 in Excel 2003 or earlier, or XFD1 in Excel 2007 or later.

This will add up column 2, 4, 6 etc. To add up 1, 3, 5, etc change ISEVEN to ISODD.
 
Back
Top Bottom