ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Copy Sum formula to different row but use same column data (https://www.excelbanter.com/excel-worksheet-functions/136143-copy-sum-formula-different-row-but-use-same-column-data.html)

jefe96

Copy Sum formula to different row but use same column data
 
I have the following data and am trying to copy the sum function to create a
running total. When I copy the formula it keeps the same column and I need
it to jump to the subsequent column. Assume this data is in columns A and B
starting in A1.

1 5 =sum(A1:A4)
2 6 =sum(b1:B4) This is what I want to happen but when I
copy the
3 7 formula in C1 to C2 it keeps the
formula in the A
4 8 column and just switches the
range. Is there any
way to have it jump to the
next column without having
to manually change it?

Max

Copy Sum formula to different row but use same column data
 
One way ..

In C1:
=SUM(OFFSET($A$1:$A$4,,ROW(A1)-1))
Copy down
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"jefe96" wrote:
I have the following data and am trying to copy the sum function to create a
running total. When I copy the formula it keeps the same column and I need
it to jump to the subsequent column. Assume this data is in columns A and B
starting in A1.

1 5 =sum(A1:A4)
2 6 =sum(b1:B4) This is what I want to happen but when I
copy the
3 7 formula in C1 to C2 it keeps the
formula in the A
4 8 column and just switches the
range. Is there any
way to have it jump to the
next column without having
to manually change it?


Roger Govier

Copy Sum formula to different row but use same column data
 
Hi Max

Just a quick "heads up".
If the OP copies that formula into C1 and copies down then they will get
a circular reference when they get to C3.
If it is only the first 4 rows of data being summed, then entering the
formula in any column, row 5 or greater will be OK.

As an alternative, they could also consider the non-volatile
=SUM(INDEX($1:$4,1,ROW(A1)):INDEX($1:$4,4,ROW(A1)) )

again entered in row 5 or below.

--
Regards

Roger Govier


"Max" wrote in message
...
One way ..

In C1:
=SUM(OFFSET($A$1:$A$4,,ROW(A1)-1))
Copy down
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"jefe96" wrote:
I have the following data and am trying to copy the sum function to
create a
running total. When I copy the formula it keeps the same column and
I need
it to jump to the subsequent column. Assume this data is in columns
A and B
starting in A1.

1 5 =sum(A1:A4)
2 6 =sum(b1:B4) This is what I want to happen but
when I
copy the
3 7 formula in C1 to C2 it
keeps the
formula in the A
4 8 column and just switches
the
range. Is there any
way to have it jump to
the
next column without having
to manually change it?




Max

Copy Sum formula to different row but use same column data
 
Thanks Roger. Yes, it was careless of me not to have noticed.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Roger Govier" wrote in message
...
Hi Max

Just a quick "heads up".out
If the OP copies that formula into C1 and copies down then they will get a
circular reference when they get to C3.
If it is only the first 4 rows of data being summed, then entering the
formula in any column, row 5 or greater will be OK.

As an alternative, they could also consider the non-volatile
=SUM(INDEX($1:$4,1,ROW(A1)):INDEX($1:$4,4,ROW(A1)) )

again entered in row 5 or below.

--
Regards

Roger Govier





All times are GMT +1. The time now is 01:42 AM.

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