Libre Office Writer calculated fields in a table automatically cleared when click in any field

I have a customer invoice form, which contains several tables, one of which contains a column for number of hours (C) and another the standard hourly cost (D). I have a calculated field which simply multiplies C*D to give the cost.

Up until yesterday, when I went in to update my December invoice and print it out, the calculated values displayed fine when the document opened and I could modify entries in the number of hours column and the cost was updated.

However, now when I open the document, although the calculated values are displayed, as soon as I click on an entry within the table, all calculated values in the table disappear.

I have tried installing the latest version of Libre Office but the same problem exists. I have tried opening previous invoices and the same problem happens.

I am using Windows 10 Professional, 64-bit English, Libre Office version 5.0.3.2

Can anyone shed any light on this, please?

Thanks, Sympol

Just an update. When I checked the formats of columns C and D, I found that some entries in column C had been changed from number to text, as had all formats in column D. I have no idea why these formats changed from closing a document which functioned perfectly to opening it again a few days later. Possibly a Windows 10 update? However, changing all column formats to number (column C) and currency (column D) together with re-entering the formula for the calculation has fixed matters