ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   reference to previous cell (always) (https://www.excelbanter.com/excel-discussion-misc-queries/126912-reference-previous-cell-always.html)

Harvey

reference to previous cell (always)
 
This seems to be a very simple thing.
I have a list of numbers and the next colum over is a running total.
If I delete a line (or insert, etc) the references become incorrect.
I always want the formula to reference the previous cell (above) in the
running total column.
Thanks
Harvey


RagDyeR

reference to previous cell (always)
 
Try this:

=SUM($A$1:A1)

And copy down as needed.

OK for deletes.
If you insert, you must of course copy the formula into the new rows.

Also, wouldn't advise using this formula if you're totaling more then 3 or 4
thousand rows.

It's hard on the system, but for small ranges it's OK.
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Harvey" wrote in message
ups.com...
This seems to be a very simple thing.
I have a list of numbers and the next colum over is a running total.
If I delete a line (or insert, etc) the references become incorrect.
I always want the formula to reference the previous cell (above) in the
running total column.
Thanks
Harvey



[email protected]

reference to previous cell (always)
 
Harvey wrote:
This seems to be a very simple thing.
I have a list of numbers and the next colum over is a running total.
If I delete a line (or insert, etc) the references become incorrect.
I always want the formula to reference the previous cell (above) in the
running total column.


I wonder if this meets your needs:

offset(B5,-1,-1)

assuming that appears in B5 itself. That references the cell in the
row above and the column to the left. If you copy the formula, B5
should be updated appropriately.


pinmaster

reference to previous cell (always)
 
Hi

One way:

=SUM(INDIRECT("A1:A"&ROW()-1))

HTH
Jean-Guy

"Harvey" wrote:

This seems to be a very simple thing.
I have a list of numbers and the next colum over is a running total.
If I delete a line (or insert, etc) the references become incorrect.
I always want the formula to reference the previous cell (above) in the
running total column.
Thanks
Harvey



Harvey

reference to previous cell (always)
 


On Jan 19, 5:28 pm, wrote:
Harvey wrote:
This seems to be a very simple thing.
I have a list of numbers and the next colum over is a running total.
If I delete a line (or insert, etc) the references become incorrect.
I always want the formula to reference the previous cell (above) in the
running total column.I wonder if this meets your needs:


offset(B5,-1,-1)

assuming that appears in B5 itself. That references the cell in the
row above and the column to the left. If you copy the formula, B5
should be updated appropriately.


Good! Thanks.
That got me to this

=B5+OFFSET(C5,-1,0)

Which works great.
Now I can delete or move a row with no problem.

Harvey


Harvey

reference to previous cell (always)
 


On Jan 19, 5:07 pm, "RagDyer" wrote:
Try this:

=SUM($A$1:A1)

And copy down as needed.

OK for deletes.
If you insert, you must of course copy the formula into the new rows.

Also, wouldn't advise using this formula if you're totaling more then 3 or 4
thousand rows.

It's hard on the system, but for small ranges it's OK.
--
HTH,

RD


Thanks for the reply, however I don't want to resum the entire column
at each line, only add the cell to the left to the one above at each
row. I got the answer from joeu2... and now

=B5+OFFSET(C5,-1,0)

does what I want.
Thanks,
Harvey


---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------"Harvey" wrote in oglegroups.com...

This seems to be a very simple thing.
I have a list of numbers and the next colum over is a running total.
If I delete a line (or insert, etc) the references become incorrect.
I always want the formula to reference the previous cell (above) in the
running total column.
Thanks
Harvey




All times are GMT +1. The time now is 07:11 AM.

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