Leave trailing zero when rounded value is converted to text

In Calc. I have a cell with a number that has six decimal places. For example 11.222202. I want to round that number to five decimal places. So to 11.22220 and then (even if there is a trailing zero) add text afterward in this case a ° symbol and place this value in another cell. So I want to go from 11.222202 to 12.22220°. Another example could be 11.222299 to 11.22230°. See below for what this would look like in a spreadsheet. Does anyone have any ideas how I can accomplish this.

initial entry desired outcome
11.222202 12.22220°
11.222299 11.22230°

User-defined Number Formats
image

image

3 Likes

Same result with format code 0.00000°, but I don’t know which requires less internal work.
Notice that there is no need to put the value in another cell, just format the source cell.
Also, if do you need text, use =TEXT(A2;"0.00000°"), so SUM will give 0.
Anyway, both options will give text if pasted as unformatted text (or with menu Data - Text to Columns).

3 Likes

fpy and LeroyG solutions both work. Thanks LeroyG too for the other possible ways to make it work and how it all works. Very nice indeed.

1 Like

Having optional places to the left of a mandatory place in the decimal segment is invalid (even though we tolerate it, as if all such “optionals” are mandatory). In fact, we even fix it to normal 0.00000 after save-and-reload to ODS.

2 Likes