• LibreOffixe Puzzle

    From Davey@2:250/1 to All on Wednesday, May 21, 2025 10:19:02
    I have a spreadsheet to follow my banking. It lists in
    consecutive columns:
    A. Notes(such as cheque no.), B. Date of transaction, C. Description
    (name), D. Debit amount, E. credit amount, F. running total.
    I have always used this in the running total cell: =IF(OR(ISNUMBER(D19),ISNUMBER(E19)),F18-D19+E19,"")
    where Column 19 is the current column, which changes as appropriate. If
    there is a debit in D19, or a credit in E19, then the new value for
    F19, the new total, is calculated, otherwise a blank is shown.
    Recently, there has been an error appearing. Instead of the correct new
    value, I am seeing '#VALUE' or '#NAME' appearing. I cannot see what is
    wrong.
    It is not changed if I remove any Conditional formatting.
    Sometimes it cures itself, other times it refuses to be fixed.
    The last time, I had to start a new spreadsheet.
    Any ideas?

    --
    Davey.


    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Java Jive@2:250/1 to All on Wednesday, May 21, 2025 13:04:57
    On 2025-05-21 10:19, Davey wrote:

    I have a spreadsheet to follow my banking. It lists in
    consecutive columns:
    A. Notes(such as cheque no.), B. Date of transaction, C. Description
    (name), D. Debit amount, E. credit amount, F. running total.
    I have always used this in the running total cell: =IF(OR(ISNUMBER(D19),ISNUMBER(E19)),F18-D19+E19,"")
    where Column 19 is the current column, which changes as appropriate.

    ITYM row?

    If
    there is a debit in D19, or a credit in E19, then the new value for
    F19, the new total, is calculated, otherwise a blank is shown.
    Recently, there has been an error appearing. Instead of the correct new value, I am seeing '#VALUE' or '#NAME' appearing. I cannot see what is
    wrong.
    It is not changed if I remove any Conditional formatting.
    Sometimes it cures itself, other times it refuses to be fixed.
    The last time, I had to start a new spreadsheet.
    Any ideas?

    I'm guessing a little here and not testing beforehand what I'm writing,
    but I note that the conditionals only test whether either Dnn or Enn has
    a number, yet the formula applied assumes in all cases that both are
    numbers. I think that perhaps you may need to cover the four
    possibilities explicitly:

    Neither are numbers ""
    Only Dnn is a number F(nn-1) - Dnn
    Only Enn is a number F(nn-1) + Enn
    Both are numbers F(nn-1) - Dnn + Enn

    Perhaps this would be easiest by explicitly defaulting non-numbers in D
    or E to 0 in the calculating part of the formula? For example ...

    IF(ISNUMBER(D19),D19,0)

    I repeat, I haven't tried this, but that's the direction I'd be
    experimenting in.

    --

    Fake news kills!

    I may be contacted via the contact address given on my website: www.macfh.co.uk


    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Java Jive@2:250/1 to All on Wednesday, May 21, 2025 13:54:26
    On 2025-05-21 13:04, Java Jive wrote:
    On 2025-05-21 10:19, Davey wrote:

    I have a spreadsheet to follow my banking. It lists in
    consecutive columns:
    A. Notes(such as cheque no.), B. Date of transaction, C. Description
    (name), D. Debit amount, E. credit amount, F. running total.
    I have always used this in the running total cell:
    =IF(OR(ISNUMBER(D19),ISNUMBER(E19)),F18-D19+E19,"")
    where Column 19 is the current column, which changes as appropriate.

    ITYM row?

    If
    there is a debit in D19, or a credit in E19, then the new value for
    F19, the new total, is calculated, otherwise a blank is shown.
    Recently, there has been an error appearing. Instead of the correct new
    value, I am seeing '#VALUE' or '#NAME' appearing. I cannot see what is
    wrong.
    It is not changed if I remove any Conditional formatting.
    Sometimes it cures itself, other times it refuses to be fixed.
    The last time, I had to start a new spreadsheet.
    Any ideas?

    I'm guessing a little here and not testing beforehand what I'm writing,
    but I note that the conditionals only test whether either Dnn or Enn has
    a number, yet the formula applied assumes in all cases that both are numbers.  I think that perhaps you may need to cover the four
    possibilities explicitly:

      Neither are numbers      ""
      Only Dnn is a number     F(nn-1) - Dnn
      Only Enn is a number     F(nn-1) + Enn
      Both are numbers         F(nn-1) - Dnn + Enn

    Perhaps this would be easiest by explicitly defaulting non-numbers in D
    or E to 0 in the calculating part of the formula?  For example ...

        IF(ISNUMBER(D19),D19,0)

    I repeat, I haven't tried this, but that's the direction I'd be experimenting in.

    A further possible problem with the formula stated in your OP: if
    sometimes the result is "", then without knowing anything more about
    your spreadsheet, reasonably it might supposed on the next row F(nn-1)
    might not be a number either, leading to another possible cause of the
    errors that you're getting.

    To speak more generally, there has long been recognition in data
    programming circles that there is a need for separation between various aspects of the subject ...

    D Data - Ensuring the accuracy and integrity of the data itself
    V View - Displaying the data in a manner useful to a human viewer

    .... and a third, variously known and described in the three or four
    letter acronyms with which the area abounds, but, for example ...

    M Model - Simplifying possibly over much for some, how the data is manipulated and processed.

    Further, and quite possibly better, explanations would doubtless be
    available online for those who wish to investigate further, but let us
    see how the first two are of particular concern to you here, because the reason you're having difficulties is that you're combining the two, when really you'd do better to keep them separate.

    What, as far as possible, you need to do is to ensure that all those
    cells that *SOMETIMES* have numeric data in fact *ALWAYS* have numeric
    data, even if it's just zero, and deal with the display of it separately
    by conditional formatting, for example from memory I'm reasonably sure
    that it's possible to hide cells containing zeros. I'm sorry that I
    haven't time to explain this more thoroughly by experimenting myself and giving you precise instructions as a result, because I'm extremely busy preparing for a trip away for a family wedding, but if you can't make
    progress yourself following the guidelines given above, I'll be able to
    give more attention to it upon my return sometime after the weekend.


    --

    Fake news kills!

    I may be contacted via the contact address given on my website: www.macfh.co.uk


    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Davey@2:250/1 to All on Wednesday, May 21, 2025 14:32:41
    On Wed, 21 May 2025 13:54:26 +0100
    Java Jive <java@evij.com.invalid> wrote:

    On 2025-05-21 13:04, Java Jive wrote:
    On 2025-05-21 10:19, Davey wrote: =20

    I have a spreadsheet to follow my banking. It lists in
    consecutive columns:
    A. Notes(such as cheque no.), B. Date of transaction, C.
    Description (name), D. Debit amount, E. credit amount, F. running
    total. I have always used this in the running total cell:
    =3DIF(OR(ISNUMBER(D19),ISNUMBER(E19)),F18-D19+E19,"")
    where Column 19 is the current column, which changes as
    appropriate. =20
    =20
    ITYM row?
    =20
    If
    there is a debit in D19, or a credit in E19, then the new value for
    F19, the new total, is calculated, otherwise a blank is shown.
    Recently, there has been an error appearing. Instead of the
    correct new value, I am seeing '#VALUE' or '#NAME' appearing. I
    cannot see what is wrong.
    It is not changed if I remove any Conditional formatting.
    Sometimes it cures itself, other times it refuses to be fixed.
    The last time, I had to start a new spreadsheet.
    Any ideas? =20
    =20
    I'm guessing a little here and not testing beforehand what I'm
    writing, but I note that the conditionals only test whether either
    Dnn or Enn has a number, yet the formula applied assumes in all
    cases that both are numbers.=C2=A0 I think that perhaps you may need to cover the four possibilities explicitly:
    =20
    =C2=A0 Neither are numbers=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ""
    =C2=A0 Only Dnn is a number=C2=A0=C2=A0=C2=A0=C2=A0 F(nn-1) - Dnn
    =C2=A0 Only Enn is a number=C2=A0=C2=A0=C2=A0=C2=A0 F(nn-1) + Enn
    =C2=A0 Both are numbers=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
    =A0 F(nn-1) - Dnn + Enn
    =20
    Perhaps this would be easiest by explicitly defaulting non-numbers
    in D or E to 0 in the calculating part of the formula?=C2=A0 For example ...
    =20
    =C2=A0=C2=A0=C2=A0 IF(ISNUMBER(D19),D19,0)
    =20
    I repeat, I haven't tried this, but that's the direction I'd be=20 experimenting in. =20
    =20
    A further possible problem with the formula stated in your OP: if=20 sometimes the result is "", then without knowing anything more about=20
    your spreadsheet, reasonably it might supposed on the next row
    F(nn-1) might not be a number either, leading to another possible
    cause of the errors that you're getting.
    =20
    To speak more generally, there has long been recognition in data=20 programming circles that there is a need for separation between
    various aspects of the subject ...
    =20
    D Data - Ensuring the accuracy and integrity of the data itself
    V View - Displaying the data in a manner useful to a human
    viewer
    =20
    ... and a third, variously known and described in the three or four=20
    letter acronyms with which the area abounds, but, for example ...
    =20
    M Model - Simplifying possibly over much for some, how the data
    is manipulated and processed.
    =20
    Further, and quite possibly better, explanations would doubtless be=20 available online for those who wish to investigate further, but let
    us see how the first two are of particular concern to you here,
    because the reason you're having difficulties is that you're
    combining the two, when really you'd do better to keep them separate.
    =20
    What, as far as possible, you need to do is to ensure that all those=20
    cells that *SOMETIMES* have numeric data in fact *ALWAYS* have
    numeric data, even if it's just zero, and deal with the display of it separately by conditional formatting, for example from memory I'm
    reasonably sure that it's possible to hide cells containing zeros.
    I'm sorry that I haven't time to explain this more thoroughly by experimenting myself and giving you precise instructions as a result,
    because I'm extremely busy preparing for a trip away for a family
    wedding, but if you can't make progress yourself following the
    guidelines given above, I'll be able to give more attention to it
    upon my return sometime after the weekend.
    =20
    =20

    Two thoughts:
    1. I fixed the fault today by indeed, as you suggest, inserting a zero
    in the D column where I had added a number in the E column. Not raining
    on your parade, but I did that before reading your message, honestly,
    but it does seem to confirm the theory.
    2. Since I have no idea when this problem is going to occur, and when it
    does, and gets fixed, it is impossible to re-create, further experiments
    will have to be on as ad-hoc basis, as and when the problem raises its
    head again. If entering a zero always fixes it, that would be a viable solution, if I cannot find any other actual cause(s).
    Thanks for the thoughts.

    --=20
    Davey.


    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Davey@2:250/1 to All on Wednesday, May 21, 2025 14:36:13
    On Wed, 21 May 2025 13:04:57 +0100
    Java Jive <java@evij.com.invalid> wrote:

    On 2025-05-21 10:19, Davey wrote:

    I have a spreadsheet to follow my banking. It lists in
    consecutive columns:
    A. Notes(such as cheque no.), B. Date of transaction, C. Description (name), D. Debit amount, E. credit amount, F. running total.
    I have always used this in the running total cell: =IF(OR(ISNUMBER(D19),ISNUMBER(E19)),F18-D19+E19,"")
    where Column 19 is the current column, which changes as
    appropriate.

    ITYM row?

    Yes, indeed.


    If
    there is a debit in D19, or a credit in E19, then the new value for
    F19, the new total, is calculated, otherwise a blank is shown.
    Recently, there has been an error appearing. Instead of the correct
    new value, I am seeing '#VALUE' or '#NAME' appearing. I cannot see
    what is wrong.
    It is not changed if I remove any Conditional formatting.
    Sometimes it cures itself, other times it refuses to be fixed.
    The last time, I had to start a new spreadsheet.
    Any ideas?

    I'm guessing a little here and not testing beforehand what I'm
    writing, but I note that the conditionals only test whether either
    Dnn or Enn has a number, yet the formula applied assumes in all cases
    that both are numbers. I think that perhaps you may need to cover
    the four possibilities explicitly:

    Neither are numbers ""
    Only Dnn is a number F(nn-1) - Dnn
    Only Enn is a number F(nn-1) + Enn
    Both are numbers F(nn-1) - Dnn + Enn

    Perhaps this would be easiest by explicitly defaulting non-numbers in
    D or E to 0 in the calculating part of the formula? For example ...

    IF(ISNUMBER(D19),D19,0)

    I repeat, I haven't tried this, but that's the direction I'd be experimenting in.

    Without delving into that yet, why would it work for nearly 700 rows,
    and then suddenly start to exhibit the described behaviour?
    I have today added a '$' to each of the row letters, just to ensure
    that there is no confusion internally in the formula.

    --
    Davey.



    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Mike Scott@2:250/1 to All on Wednesday, May 21, 2025 15:46:40
    On 21/05/2025 14:36, Davey wrote:
    Without delving into that yet, why would it work for nearly 700 rows,
    and then suddenly start to exhibit the described behaviour?
    I have today added a '$' to each of the row letters, just to ensure
    that there is no confusion internally in the formula.

    $ can be dangerous.

    But I'm tempted to repeat what someone told me a long time ago.... "if
    you want to go /there/, don't start /here/'. In this case, using
    something like gnucash, designed for the job, rather than trying to
    design from scratch and debug an idiosyncratic spreadsheet might be more rewarding in the medium term.

    Just my 2p worth.

    --
    Mike Scott
    Harlow, England

    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: Scott family (2:250/1@fidonet)
  • From Andy Burns@2:250/1 to All on Wednesday, May 21, 2025 16:11:31
    On 21/05/2025 13:04, Java Jive wrote:

    I note that the conditionals only test whether either Dnn or Enn has a number, yet the formula applied assumes in all cases that both are numbers.

    the formula doesn't check whether the F column from the previous row is
    also number?

    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: Air Applewood, The Linux Gateway to the UK & Eire (2:250/1@fidonet)
  • From Davey@2:250/1 to All on Wednesday, May 21, 2025 17:16:59
    On Wed, 21 May 2025 16:11:31 +0100
    Andy Burns <usenet@andyburns.uk> wrote:

    On 21/05/2025 13:04, Java Jive wrote:

    I note that the conditionals only test whether either Dnn or Enn
    has a number, yet the formula applied assumes in all cases that
    both are numbers.

    the formula doesn't check whether the F column from the previous row
    is also number?

    No, but that has never been a problem. This problem that I am now seeing
    only occurs when the result should be a number.

    --
    Davey.


    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Davey@2:250/1 to All on Wednesday, May 21, 2025 17:18:40
    On Wed, 21 May 2025 15:46:40 +0100
    Mike Scott <usenet.16@scottsonline.org.uk.invalid> wrote:

    On 21/05/2025 14:36, Davey wrote:
    Without delving into that yet, why would it work for nearly 700
    rows, and then suddenly start to exhibit the described behaviour?
    I have today added a '$' to each of the row letters, just to ensure
    that there is no confusion internally in the formula.

    $ can be dangerous.

    But I'm tempted to repeat what someone told me a long time ago....
    "if you want to go /there/, don't start /here/'. In this case, using something like gnucash, designed for the job, rather than trying to
    design from scratch and debug an idiosyncratic spreadsheet might be
    more rewarding in the medium term.

    Just my 2p worth.


    I have never heard of gnucash. I have never looked for any other
    spreadsheet, when mine has worked fine up until now.

    --
    Davey.


    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Andy Burns@2:250/1 to All on Wednesday, May 21, 2025 19:00:01
    On 21/05/2025 17:16, Davey wrote:

    On Wed, 21 May 2025 16:11:31 +0100
    Andy Burns <usenet@andyburns.uk> wrote:

    On 21/05/2025 13:04, Java Jive wrote:

    I note that the conditionals only test whether either Dnn or Enn
    has a number, yet the formula applied assumes in all cases that
    both are numbers.

    the formula doesn't check whether the F column from the previous row
    is also number?

    No, but that has never been a problem. This problem that I am now seeing
    only occurs when the result should be a number.
    If the problem isn't currently happening, nobody can give an accurate
    answer how to fix it, have you got a backup (I think that's the default)
    of the file from before your most recent edit?

    Maybe turn on versioning in the file menu, so you can "rewind" to
    previous versions?


    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: Air Applewood, The Linux Gateway to the UK & Eire (2:250/1@fidonet)
  • From Java Jive@2:250/1 to All on Wednesday, May 28, 2025 14:26:51
    On 2025-05-21 13:54, Java Jive wrote:

    What, as far as possible, you need to do is to ensure that all those
    cells that *SOMETIMES* have numeric data in fact *ALWAYS* have numeric
    data, even if it's just zero, and deal with the display of it separately
    by conditional formatting, for example from memory I'm reasonably sure
    that it's possible to hide cells containing zeros.  I'm sorry that I haven't time to explain this more thoroughly by experimenting myself and giving you precise instructions as a result, because I'm extremely busy preparing for a trip away for a family wedding, but if you can't make progress yourself following the guidelines given above, I'll be able to
    give more attention to it upon my return sometime after the weekend.

    Now that I'm back from the wedding, I thought I ought to check up on my statement above based only on memory, and indeed I was correct.
    Although it is slightly more complex than I thought I remembered (but
    probably that memory was based on Excel), you can use conditional
    formatting to hide zero values, as follows:

    1) Select the cells to be formatted

    2) Format, Cells

    3) In the Format Code field, enter something like the following
    (this for UK currency, other currencies can be adapted similarly to
    this) ...

    [=0];[<0][RED][$£-809]#,##0.00;[$£-809]#,##0.00

    .... explained as follows ...

    [=0]; # If =0, no formula, nothing displayed
    [<0][RED][$£-809]#,##0.00; # If <0, usual formula but red
    Remainder # If neither of above, usual formula

    At least for my installation of v24.8, further details are available
    from ...

    file:///<LibreOfficePath>/help/<language>/text/shared/01/05020301.html

    .... which for me is ...

    <file:///C:/Programs/LibreOffice/help/en-US/text/shared/01/05020301.html>

    --

    Fake news kills!

    I may be contacted via the contact address given on my website: www.macfh.co.uk


    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Daniel James@2:250/1 to All on Thursday, May 29, 2025 11:57:50
    On 28/05/2025 14:26, Java Jive wrote:
    I thought I ought to check up on my statement above based only on
    memory, and indeed I was correct. Although it is slightly more complex
    than I thought I remembered (but probably that memory was based on
    Excel), you can use conditional formatting to hide zero values, as follows:

      1)  Select the cells to be formatted

      2)  Format, Cells

      3)  In the Format Code field, enter something like the following
    (this for UK currency, other currencies can be adapted similarly to
    this) ...

          [=0];[<0][RED][$£-809]#,##0.00;[$£-809]#,##0.00

    ... explained as follows ...

          [=0];                      # If =0, no formula, nothing displayed
          [<0][RED][$£-809]#,##0.00; # If <0, usual formula but red
          Remainder                  # If neither of above, usual formula

    *IF* I understand you correctly ...

    That's not what's normally meant by "Conditional formatting" in
    LibreOffice Calc. That's just the normal formatting applied to a cell,
    and your example is rather over-complicated for this simple case.

    I normally use a format string for currencies something like:

    [$£-809]#,##0.00;[RED]-[$£-809]#,##0.00;""

    Note that there are three semicolon-separated formats here:

    - [$£-809]#,##0.00
    - [RED]-[$£-809]#,##0.00
    - ""

    These are applied to display of positive, negative, and zero values respectively. There's no need to specify conditionals explicitly if you
    just want those three. (There's also no need, in my experience, to write "[$£-809]" for a pound sign, "£" will do just as well. Your mileage may
    vary - I'm using Linux with Unicode as the default character encoding
    and more hoops may need to be jumped through on other systems/locales.

    Note that what LO Calc calls "Conditional formatting" is a feature that
    allows a cell to be displayed in any defined style according to the
    value of any general expression. This lets you do fancy things like
    giving alternate lines a grey background, automatically highlighting the largest value in a table, etc.

    I've recently used it to highlight dates in a table that were in the
    same month as the date in the row above (sometimes I get two meter
    readings in a month, when the electricity rate changes).

    --
    Cheers,
    Daniel.

    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: Daniel James (2:250/1@fidonet)
  • From Java Jive@2:250/1 to All on Thursday, May 29, 2025 12:36:35
    On 2025-05-29 11:57, Daniel James wrote:

    On 28/05/2025 14:26, Java Jive wrote:

    I thought I ought to check up on my statement above based only on
    memory, and indeed I was correct. Although it is slightly more complex
    than I thought I remembered (but probably that memory was based on
    Excel), you can use conditional formatting to hide zero values, as
    follows:

       1)  Select the cells to be formatted

       2)  Format, Cells

       3)  In the Format Code field, enter something like the following
    (this for UK currency, other currencies can be adapted similarly to
    this) ...

           [=0];[<0][RED][$£-809]#,##0.00;[$£-809]#,##0.00

    ... explained as follows ...

           [=0];                      # If =0, no formula, nothing displayed
           [<0][RED][$£-809]#,##0.00; # If <0, usual formula but red
           Remainder                  # If neither of above, usual formula

    *IF* I understand you correctly ...

    That's not what's normally meant by "Conditional formatting" in
    LibreOffice Calc. That's just the normal formatting applied to a cell,
    and your example is rather over-complicated for this simple case.

    I normally use a format string for currencies something like:

      [$£-809]#,##0.00;[RED]-[$£-809]#,##0.00;""

    Note that there are three semicolon-separated formats here:

      - [$£-809]#,##0.00
      - [RED]-[$£-809]#,##0.00
      - ""

    Yes, I've just tried this and it works just as well. The main
    difference is that I've explicitly stated the conditions, not realising
    that there was a simpler default conditional arrangement which applied.
    Also you've explicitly included the minus sign for negative values
    instead of just displaying them in a different colour - I noticed that
    after making my OP and wondered whether it was worth explaining that in
    a follow-up post.

    These are applied to display of positive, negative, and zero values respectively. There's no need to specify conditionals explicitly if you
    just want those three. (There's also no need, in my experience, to write "[$£-809]" for a pound sign, "£" will do just as well. Your mileage may vary - I'm using Linux with Unicode as the default character encoding
    and more hoops may need to be jumped through on other systems/locales.

    I just copied the formatting for '£' from one of the pre-defined formats.

    Note that what LO Calc calls "Conditional formatting" is a feature that allows a cell to be displayed in any defined style according to the
    value of any general expression. This lets you do fancy things like
    giving alternate lines a grey background, automatically highlighting the largest value in a table, etc.

    Well, it's just words, we both know what we mean, but I'd definitely
    term the above as conditional formatting, because the way cells are
    displayed depends on their contents.

    --

    Fake news kills!

    I may be contacted via the contact address given on my website: www.macfh.co.uk


    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)