ranges in arrays, is this possible?

H

HGood

I'm new to arrays, but this is what I'm trying to do.

In Row 1 I insert "2" in cells A1:D1.
In Row 2 I insert "4" in cells A2:D2.
In Row 3 I insert "6" in cells A3:D3.
In Row 4 I insert "8" in cells A4:D4.

If I type the array {=(A1:A4)+(D1:D4)} in cells E1:E4, I get the totals
4,8,12,16.

But is there a way, using an array, to include columns B and C in this
total?

I tried arrays such as:
{=sum(A1:A4):(D1:D4)} doesn't work
{=sum((A1:A4):(D1:D4))} doesn't work
{=(A1:A4)+(B1:B4)+(C1:C4)+(D1:D4)} gives the 8,16,24,32 totals I want, but
if I want to include more columns I was hoping to do it without having to
list every column.

Is there a shorter way to come up with the same result?

Thanks
 
H

HGood

I tried it but this just gives "40" in the four cells E1:E4. It should be
4,8,12,16.

Any other suggestions?

Harold

=============
 
H

HGood

OOPs, this is the correct response.
I tried it but this just gives "40" in the four cells E1:E4. It should be
8,16,24,32.

Any other suggestions?

Harold

=============
 
A

Alan Beban

HGood said:
I'm new to arrays, but this is what I'm trying to do.

In Row 1 I insert "2" in cells A1:D1.
In Row 2 I insert "4" in cells A2:D2.
In Row 3 I insert "6" in cells A3:D3.
In Row 4 I insert "8" in cells A4:D4.

If I type the array {=(A1:A4)+(D1:D4)} in cells E1:E4, I get the totals
4,8,12,16.

But is there a way, using an array, to include columns B and C in this
total?

I tried arrays such as:
{=sum(A1:A4):(D1:D4)} doesn't work
{=sum((A1:A4):(D1:D4))} doesn't work
{=(A1:A4)+(B1:B4)+(C1:C4)+(D1:D4)} gives the 8,16,24,32 totals I want, but
if I want to include more columns I was hoping to do it without having to
list every column.

Is there a shorter way to come up with the same result?

Thanks
=SUM(A1:D1) and fill down.

Alan Beban
 

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