Bug 168683 - FORMATTING : the TEXT() function doesn't work as one would expect
Summary: FORMATTING : the TEXT() function doesn't work as one would expect
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.8.1.1 release
Hardware: All NetBSD
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-03 21:18 UTC by Paul Goyette
Modified: 2025-10-03 22:24 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Goyette 2025-10-03 21:18:06 UTC
Description:
Specifying a formula with TEXT() function fails.  The formula =TEXT(123.4,"#,###.##") results in a value of ``123.4'' - it drops the fractional digits.  The expected result should be ``123.40''

Steps to Reproduce:
1.enter formula in a cell =TEXT(123.4,"#,###.##")
2.
3.

Actual Results:
123.4

Expected Results:
123.40 (should have exactly two fractional digits)


Reproducible: Always


User Profile Reset: No

Additional Info:
version libreoffice-25.8.1.1nb1 (from NetBSD pkgsrc)

NetBSD version 11.99.3

Version: 25.8.1.1 (X86_64) / LibreOffice Community
Build ID: 580(Build:1)
CPU threads: 32; OS: unknown; UI render: default
Locale: en-US (C); UI: en-US
Calc: threaded
Comment 1 Paul Goyette 2025-10-03 22:19:46 UTC
Note that the fractional digit(s) are dropped only if the trailing digit would be zero, ie =TEXT(123.40,"###.##") displays ``123.4'' but TEXT(123.41,"###.##") shows the correct value ``123.41''

Also note that the decimal point is similarly affected.  TEXT(123.00,"###.##") displays ``123''
Comment 2 m_a_riosv 2025-10-03 22:24:00 UTC
If you want zeroes to the right of decimal point, you nee to use '.00' instead '.##'

https://help.libreoffice.org/latest/en-US/text/shared/01/05020301.html?&DbPAR=CALC&System=WIN