Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Adding negative formatting for custom number format

$
0
0

I have a custom number format that formats a number into an in-game currency, the currency is broken down into copper, silver and gold with the following conversion;

1 gold = 100 silver = 10000 copper

The following formula works great for any positive number;

[<100]#"c";[>10000]#"g "##"s "##"c";#"s "##"c";

But when applied to a negative number the formatting fails and displays -50000c instead of -5g.
Is it possible to amend the formula to also apply the correct formatting to negative numbers as well?


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>