I was looking for group "Calc for the Stupid" and this group seemed to be close.
I have a Column of cells that I update daily. I then =SUM(A1:A10) in cell A11.
What I want to do is add A11 to the current value in A12. I tried using the CURRENT() function, but it seems to double the value.
Is there a way to do this.
[Solved] Running total in accumulator
-
- Posts: 4
- Joined: Sun Mar 24, 2024 9:14 pm
- Location: Florence AZ
[Solved] Running total in accumulator
Last edited by MrProgrammer on Mon Apr 15, 2024 8:42 pm, edited 2 times in total.
Reason: Tagged ✓ [Solved] Solutions provided and no further questions from Grandapa Jim-- MrProgrammer, forum moderator
Reason: Tagged ✓ [Solved] Solutions provided and no further questions from Grandapa Jim-- MrProgrammer, forum moderator
Jim Openoffice 4.1.15 Win 11
Re: Running Total
In A13 enter =A11+A12
If you wish A12 to be increased by the value in A11, this is equivalent to A12 equaling A11+A12 - a circular reference, which in spreadsheets is not allowed
If you wish A12 to be increased by the value in A11, this is equivalent to A12 equaling A11+A12 - a circular reference, which in spreadsheets is not allowed
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Re: Running Total
- Attachments
-
- 111410.ods
- (17.16 KiB) Downloaded 20 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
-
- Posts: 4
- Joined: Sun Mar 24, 2024 9:14 pm
- Location: Florence AZ
Re: Running Total
Why is this so difficult? How does one set up an accumulator. The CURRENT() function looks like it should work for what I am trying to do. I tried setting A12to =CURRENT() + A11 But that seems to double the value.
Jim Openoffice 4.1.15 Win 11
Re: Running Total
What is so difficult?
A very simple rule: You can not store a single constant number AND a Formula in same time in a Cell.
But you can store the new values (as constant) in the Formulas:
For A12: =A11+23.45
For A13: =A12+33.45
Of course the Cell will not display the new entered constant value, but it will show the new result.
A very simple rule: You can not store a single constant number AND a Formula in same time in a Cell.
But you can store the new values (as constant) in the Formulas:
For A12: =A11+23.45
For A13: =A12+33.45
Of course the Cell will not display the new entered constant value, but it will show the new result.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
- MrProgrammer
- Moderator
- Posts: 4913
- Joined: Fri Jun 04, 2010 7:57 pm
- Location: Wisconsin, USA
Re: Running Total
[Solved] Cell which totals data entered into an input cell
[Solved] How to keep a number?
[Solved] Keep adding numbers on a single cell
Enter numbers in one cell, have them add up in another
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
Re: Running Total
A spreadsheet is no pocket calculator which has an accumulating register. Spreadsheets also have no variables usable as accumulators like any general-purpose program.Grandapa Jim wrote: ↑Sat Mar 30, 2024 5:49 am Why is this so difficult? How does one set up an accumulator.
If you want to use a spreadsheet cell as an accumulator you basically need to equip it with a procedural program in the background.
To simulate accumulation using spreadsheet formulas as they are (low-level functional programming), you need to write every single input to a cell in a way as @Villeroy already exemplified.
A variant is shown in the attached sheet.
===Editing===
Now there is also an example with accumulating cells based on a sheet event handler for onContentChanged.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
---
Lupp from München