Ask Your Question
1

Currency formatting not being applied to cell with user defined basic formula.

asked 2017-01-26 20:08:02 +0100

krafczyk gravatar image

Currency formatting is not applied to calc cells which contain user defined formulas that return 'Currency' values.

For example, if you create the following basic function:

Function TestFunc() As Currency
    Dim Result As Currency
    Result = 5.50
    TestFunc = Result
End Function

Then use that function in a cell like =TestFunc(), the value '5.5000' appears in the cell.

If I try to enforce the typical currency style by selecting the cell and going to 'Format' 'Cells..' And then double clicking the currency format I want, nothing happens. '5.5000' continues to be displayed even though '$5.50' ought to be displayed.

In addition, If you create several such cells and then try to sum over them with the =SUM function, the value is always '$0.00'.

Any ideas why this is happening?

I'm currently using libreoffice 5.2.4.0 on Arch linux.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2017-01-26 21:11:04 +0100

erAck gravatar image

The BASIC Currency return type is not recognized as number but string instead, which seems to be a bug. To workaround, do not define it as Currency but return a normal number instead.

edit flag offensive delete link more

Comments

Submitted bug tdf#105558

erAck gravatar imageerAck ( 2017-01-26 21:20:18 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-01-26 20:08:02 +0100

Seen: 32 times

Last updated: Jan 26