2020 Archives by date, by thread · List index

Re: [libreoffice-users] Static vs. dynamic maximum

```At 06:41 02/10/2020 -0700, Chimel Noname wrote:
```
... I am also stuck with extracting the maximum value of one given cell. For instance, A1 contains variable numbers, and I want to store the maximal value of this cell in B1.
```
```
As others have said, the cell, does not "contain variable numbers", but only the single value (or expression) that is there at the time.
```
```
The trouble is that MAX() compares 2 different cells, whereas I want the maximal value of one cell.
```
No, you don't.

```
A recursive formula such as =MAX(A1;B1) would probably not work, and returns an error 523 indeed.
```

At 07:18 02/10/2020 -0700, Chimel Noname wrote:
```
A cell with a formula can have a whole "history" of values that change every now and then.
```
No, the cell has just whatever is in it now.

```
It has only one value at one given time, it's this value that I want to compare with its previous values so I can extract the maximal value the cell ever reached.
```
```
But the previous values have been overwritten by the current one, so are no longer there.
```
```
Actually, you have solved your own problem. If you want to keep a record in B1 of the largest of all the values that have appeared in A1, then putting
```=MAX(A1;B1)
```
into B1 would appear to work - as B1 has kept a record of that part of the history of A1's values that you need. But the logic is recursive: evaluating the formula changes one of its parameters, so the formula potentially needs evaluating again. How many times should this happen? The process might never terminate. In this case, you want the calculation to happen once only, but how can LibreOffice know that?
```
```
All you need to do is to permit recursive calculations, which you do by ticking Tools | Options... | LibreOffice Calc | Calculate | Iterative References | Iterations. Then your formula works.
```
I trust this helps.

Brian Barker

--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/