رʽ˱ʽѱʽΪֵ

FormatNumber(
   expression [,NumDigitsAfterDecimal [,IncludeLeadingDigit [,UseParensForNegativeNumbers [,GroupDigits]]]]
)
Arguments
Expression 
ѡҪʽıʽ 
NumDigitsAfterDecimal 
ѡָʾСҲʾλֵĬֵΪ -1ָʾʹõǼá 
IncludeLeadingDigit 
ѡָ̬ʾǷʾСֵСǰ㡣йֵġá֡ 
UseParensForNegativeNumbers 
ѡָ̬ʾǷ񽫸ֵСйֵġá֡ 
GroupDigits 
ѡָ̬ʾǷʹüַָŽַ顣йֵġá֡ 

IncludeLeadingDigitUseParensForNegativeNumbers  GroupDigits ֵ

 ֵ  
TristateTrue -1 True 
TristateFalse 0 False 
TristateUseDefault -2 ʹüеá 

˵
ʡһѡʱɼṩʡԲֵ

ע   Ϣȡõġ֡ǩ
 FormatNumber ֵʽΪλС: 

Function FormatNumberDemo 
   Dim MyAngle, MySecant, MyNumber
   MyAngle = 1.3                ' ûȶǡ
   MySecant = 1 / Cos(MyAngle)  ' ֵ
   FormatNumberDemo = FormatNumber(MySecant,4) '  MySecant ʽΪλС
End Function
Ҫ
汾2
