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

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -