J
Jennifer Murphy
Is there a custom format string that will format a number so that the
decimal point is displayed *only* if there are non-zero digits to the
right?
I tried #,##0.####, which works great except for integers.
"12345" formats as "12,345."
I'd like to get
"12,345"
But I want to get the decimal point and any non-zero digits to the
right of the decimal point. Here are some examples:
Before After
0.123456 0.1235
5.34 5.23
25 25 /* no decimal point */
1,234.56789 1,234.5679
decimal point is displayed *only* if there are non-zero digits to the
right?
I tried #,##0.####, which works great except for integers.
"12345" formats as "12,345."
I'd like to get
"12,345"
But I want to get the decimal point and any non-zero digits to the
right of the decimal point. Here are some examples:
Before After
0.123456 0.1235
5.34 5.23
25 25 /* no decimal point */
1,234.56789 1,234.5679