To create a custom number format, you start by selecting one of the built-in number formats as a starting point. You can then change any one of the code sections of that format to create your own custom number format.
A number format can have up to four sections of code, separated by semicolons. These code sections define the format for positive numbers, negative numbers, zero values, and text, in that order.
<POSITIVE>;<NEGATIVE>;<ZERO>;<TEXT>
with text-function
for numbers "0;;0;"
for texts ";;"
Thank you.
I know about the four sections of code and I know the TEXT function. Still it is not obvious to me why the code for numbers is "0;;0;" and for texts ";;". Is this explained anywhere?
To create a custom number format, you start by selecting one of the built-in number formats as a starting point. You can then change any one of the code sections of that format to create your own custom number format.
0;;0;
will only display positive numbers and 0 values (the negative and text sections being blank).
";;"
has all the number sections blank, so would only return text.