We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

Libreoffice speadsheet help

Options
2

Comments

  • lindabea
    lindabea Posts: 1,530 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    Putting the formula in B3.... IF (B1>B2,B3) works fine as long as whenever I update B1 with a greater value. If I enter a lower value in B1, then B3 gets updated with zero. Logically, it's correct because the condition is false, so B3 is populated with the 'otherwise' value. Looks like I'm going to have to read up about macros
    Before doing something... do nothing
  • Paul_DNAP
    Paul_DNAP Posts: 751 Forumite
    500 Posts Second Anniversary Photogenic Rampant Recycler
    B4 comes into it because you can't do a calculation in B3 and preserve the previous value that is in there, so you need a brand new spare cell to do your calculations and display your result.


    But then you want the result of the calculation to be preserved, even after you alter the cells you're doing the calculation, this is even trickier, because of course the B1>B2 will always look at the current value of B1 and not what it used to be previously.


    So I can only suggest that the only way to do it would be to manually fill out B3.


    Or, you'd need to have some way of preserving the historical data, and then referencing the "else" part of your =IF to the previous entry and not the current entry.
    (Although I could be wrong, I often am.)
  • Cornucopia
    Cornucopia Posts: 16,471 Forumite
    Part of the Furniture 10,000 Posts Name Dropper Photogenic
    It would be useful to know whether the requirement is for a single "round" of comparison, or whether the intention is for repeated comparisons, potentially with retention of more than one previous value.

    The former case is doable with one additional cell, as suggested. The latter case is a spreadsheet all of its own.
  • lindabea
    lindabea Posts: 1,530 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    Cornucopia wrote: »
    It would be useful to know whether the requirement is for a single "round" of comparison, or whether the intention is for repeated comparisons, potentially with retention of more than one previous value.

    The former case is doable with one additional cell, as suggested. The latter case is a spreadsheet all of its own.

    My intention is for repeated comparisons. So, in B1 I want to enter the latest value which could be higher or lower then the previous value contained in B1. Ideally, the value in B3 should only change when B1 has a larger value then previously entered. So B3 should only ever show the greatest value that B1 ever had.
    Before doing something... do nothing
  • Paul_DNAP
    Paul_DNAP Posts: 751 Forumite
    500 Posts Second Anniversary Photogenic Rampant Recycler
    The only way I can see to do that "greatest value ever had" easily is by retaining the historical data and finding the maximum from the whole set.


    That's because, you can't do a logic on the previous value of B1 because the spreadsheet does not know what the previous value was as you've over written it.


    You might be able to write a script that puts up a prompt box for the new data which it can store and compare against the old data in the sheet before writing the new entries out, but that's beyond me.
    (Although I could be wrong, I often am.)
  • Cornucopia
    Cornucopia Posts: 16,471 Forumite
    Part of the Furniture 10,000 Posts Name Dropper Photogenic
    Have you looked at the MAX function? You can specify a range of cells, and it will return the maximum value across all of them.

    https://www.excelfunctions.net/MaxFunction.html

    Otherwise, I think you'll need to set out a long list of cells with your values and formulas in them, so as to be able to make multiple comparisons.
  • lindabea wrote: »
    Putting the formula in B3.... IF (B1>B2,B3) works fine as long as whenever I update B1 with a greater value. If I enter a lower value in B1, then B3 gets updated with zero. Logically, it's correct because the condition is false, so B3 is populated with the 'otherwise' value. Looks like I'm going to have to read up about macros
    That's why the Iterative Calculation option is necessary but appreciate may not be possible in LibreOffice.
  • DoaM
    DoaM Posts: 11,863 Forumite
    10,000 Posts Fifth Anniversary Name Dropper Photogenic
    Some description of the context of what you're trying to achieve might help someone to devise a better scheme. What is this in relation to?
  • Problem is with iterative calculation - following works in Excel but LibreOffice?
    Excel Options - Formulae - Enable Iterative Calculation - Maximum Iterations = 1.
    In B3 enter formula =IF(B1>B2,B1,B3).
    Seems there is an iterative calculation option in LibreOffice - see https://help.libreoffice.org/Common/Calculate#Iterative_references
  • John_Gray
    John_Gray Posts: 5,843 Forumite
    Part of the Furniture 1,000 Posts Name Dropper Photogenic
    LibreOffice Calc was written to match Excel as closely as possible. This would include dealing with circular references.
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 350.8K Banking & Borrowing
  • 253.1K Reduce Debt & Boost Income
  • 453.5K Spending & Discounts
  • 243.8K Work, Benefits & Business
  • 598.7K Mortgages, Homes & Bills
  • 176.8K Life & Family
  • 257.1K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.1K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.