View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Ardus Petus
 
Posts: n/a
Default summing non contiguous ranges

Try INDIRECT

--
AP

"valaor" a écrit dans le message de
...
Thanks for the tip. From your post I got this idea for shortening the

formula:

=SUMPRODUCT(A1:DL5*(MOD(COLUMN(A1:DL5),2)=1))

It works. Thanks again. I now have a next question: If the ranges are not
evenly spaced, they are still in rows 1-5, but in various columns, not

every
two. Is there a way to have an extra table with the column names holding
"sensitive" data and use this?

"Ardus Petus" wrote:

If you have only 5 rows, you can write:
=SUMPRODUCT(--(MOD(COLUMN(A1:K5),2)=1),A1:K1+A2:K2+A3:K3+A4:K4+A 5:K5)

I could not find any shorter

HTH
--
AP

"valaor" a écrit dans le message de
...
I need to sum cells A1:A5, C1:C5, E1:E5 etc, i.e. the first top 5

cells in
every second column. I must sum more than 50 such ranges, so

SUM(A1:A5,
C1:C5, ...) is not an option. Can this be done with formulas?