Mohave Community College strives to meet the growing workforce needs of business and industry and to provide opportunities for small business development. MCC strives to provide high quality, affordable and accessible higher education to all who seek it
Returns or sets a Variant value that represents the format code for the object. expression .NumberFormat. expression A variable that represents a Range object. This property returns Null if all cells in the specified range don't have the same number format. The format code is the same string as the Format Codes option in the Format Cells dialog box. The Format function uses different format code strings than do the NumberFormat and NumberFormatLocal properties.
When you want to display leading zeros for variable-length numbers, create a custom format with the same number of zeros (0) (in quotation marks) as leading zeros that you want to display, followed by the number sign (#).xample 1: Use the 00000 format to display a number with five digits. When you use this format, the numbers that you type and the numbers that Microsoft Excel displays are listed in the following table.