• Learn
• Blog
• Pricing

You can now pad numbers with leading zeroes by setting a minimum number of integer digits in the inspector. With a minimum number of four digits, 23 is formatted as 0023. As a bonus, we show how to accomplish the same thing using formulas and share some news regarding the venerable IF function.

Calcapp has long had comprehensive support for formatting numbers. Use thousands separators (200 000, not 200000), format numbers using scientific notation (1.00E+04, not 10000) and format the fractional part of a number as an actual fraction (3 3/4, not 3.75). You also get full control over the number of decimal places that are used (12.36 can be formatted as 12.4 or as 12.3600, depending on your preferences).

What hasn’t been very straight-forward in the past has been formatting numbers with leading zeroes. Imagine if you always want a number to appear formatted with four digits at a minimum. That means that 23 should appear as 0023, 123 as 0123 and 12345 as 12345. Now, you can specify the number of integer digits a number should be formatted with, right in the inspector:

Note: The eagle-eyed reader may have noticed that we only pass two parameters to the IF function in the formula above. Traditionally, the IF function takes three parameters: a condition which evaluates to TRUE or FALSE, a value to use if the condition evaluates to TRUE and a value to use if it evaluates to FALSE. It turns out that popular spreadsheets also accept only two parameters as well, allowing users to leave out the third parameter, which created work for some of our app creators. As a result, we have made the third parameter optional in Calcapp. IF now returns a blank value if the condition evaluates to FALSE and no third parameter is supplied. `IF(2 > 3, 42)` is thus now equivalent to `IF(2 > 3, 42, BLANK())`.