I am not familiar with the style of formula used in the document. I suppose it is "intuitive" to some people, but it looks like a verbose mess to me. I believe the equivalent formula for cell H5 would be the following in OpenOffice.

- Code: Select all Expand viewCollapse view
`=IF(COUNT(F5:G5) = 0;"";-SUM($F$5:F5) + SUM($G$5:G5))`

You can copy/paste that down the column to fill the rest of column H. A slightly clearer version

- Code: Select all Expand viewCollapse view
`=IF(COUNT(F5:G5) = 0;""; SUM($G$5:G5) - SUM($F$5:F5))`

The logic of the formula is: If there are no numbers in column F and G of the current row, return an empty string of text. Otherwise, sum from G5 to the current row in column G and subtract the sum from F5 to the current row in column F.

In other words, add all the credits and subtract the sum of the debits. G5 and F5 appear twice in the SUMs because the current row is row 5 when the formula is in H5. When you copy the formula down to row six it will become

- Code: Select all Expand viewCollapse view
`=IF(COUNT(F6:G6) = 0;""; SUM($G$5:G6) - SUM($F$5:F6))`

LibreOffice may handle the actual Excel formula without modification but even if it does, an old timer like me would change that formula to what I wrote.