excel - Custom number format for NULL -
i have excel sheet populate database. custom number format can use replace null values in excel hyphen '-' ? know can use following formula
#,##0_);(#,##0);–_);_(@_)
in order display zero. don't know how handle null value.
the simple answer number format strings not have section null values. see ecma-376 section 18.8.31 explanation:
up 4 sections of format codes can specified. format codes, separated semicolons, define formats positive numbers, negative numbers, 0 values, , text, in order. if 2 sections specified, first used positive numbers , zeros, , second used negative numbers. if 1 section specified, used numbers.
one workaround check null values, emit text value, , set text format. example, using formula 0;0;0;"-"
:
value formatted #null! - null - 1 1 2 2 3 3 4 4
note works if expect result numerical. if expect string value, can opposite ("-";"-";"-";@
)
Comments
Post a Comment