Fixed date in libreoffice calc 7.1

Has anybody found a solution for for inserting the date and time and fixing it in Libreoffice calc 7.1
=IF(B11="",IF(D11="","",TODAY()),B11). This used to work in older versions, but now gives err 522 which applies to circular formulae. Tried every where on the net but cannot find anything.

Insert|Date, Insert|Time.

Using formulas to insert something locked is conceptually wrong, since formulas are by definition designed to compute output data dynamically from changing input data.

Hi. Do you need an actual ‘formula’ to ‘calculate’ it ? If you just want to enter today’s date and FIX it at that, you can use " Ctrl ; " . (control & semi-colon together) The cell can also be formatted to show that date in any date format you wish.

I need this for my buying and selling stocks, When I put the buy price in I need the time and date in another cell, and then when i put the sell price in I need the time and date in another cell. I then need to calculate the time that stock has been held. I think I will probably have to use a macro to enter the dates, although I am not sure how that works in libreoffice.

Uploading the sample data file can speed things up.

Is it so diffficult to switch per →or← to neighbourcell and hit<ctrl>; <ctrl><shift>;

Options - LibreOffice Calc - Calculate - Iterative References
Check the box ‘Iterations’ and everything should work as in previous versions.

Please keep in mind that there are many reasons not to use circular references in Calc, and if you decide to apply this solution in your sheets, it’s on your own risk.

That’s the point.

Circular references are sometimes useful and justified if they are designed to get solutions by a limited number of iterations. Such results are also re-created based on the data by the formula if once lost, due to a mishap.
The construct of “conditionally suspended self-reference” is generally unstable. No functional undo, e.g.