[SOLVED]Custom format for decimal numbers

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
lueu
Posts: 89
Joined: Tue Mar 07, 2023 11:49 pm

[SOLVED]Custom format for decimal numbers

Post by lueu »

Hi!
Anyone know if (and how) I can write a custom format for decimal numbers that removes zeroes if any?

I have set the number of digits after decimal point to 6 (maximum), but for numbers that have zeroes after decimal point I would like these to be cut out, ex. 248.150000 would show as 248.15, 543.000000 shows as 543, but 256.486259 would show all 6 decimals.

There is no "Automatic" choice for the numbers after decimal point, unless there is a way to set this in Custom format. "#.#" does not work, this only gives one digit after the decimal point.
Last edited by lueu on Thu Dec 14, 2023 8:51 am, edited 1 time in total.
ACDC
Posts: 1143
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: Custom format for decimal numbers

Post by ACDC »

try a variation of this in the custom format: #,##0.0000 or #,##0.00
lueu
Posts: 89
Joined: Tue Mar 07, 2023 11:49 pm

Re: [SOLVED] Custom format for decimal numbers

Post by lueu »

Thanks for the tip! It didn't work exactly as I needed, but helped me understand how I could play with the custom format. Ended up with #.########## since I have 10 decimals, and this format seems to cut the last zeroes in line. Thank you :)
Post Reply