Format
Previous Top Next

Returns a string representing a given number in a specific format.
Syntax: Format (Number, Format String)
Format string can be:
·    Dn - Integer number with a minimum of n digits. It will add leading zeros if needed.
·    En -  Scientific number (d.dddde-010) with n digits after the decimal point.
·    Fn - Fixed Point with n digits after the decimal point.
·    Nn - Number format (dd,ddd,ddd.dddddd) with n digits after the decimal point.
·    Pn - Percent format. Multiplies the number with 100 and adds the percent sign.

Example:
Msgbox (Format(1234.5678,"N2"))
Will display: 1,234.57