📜  vba 格式货币 - VBA 代码示例

📅  最后修改于: 2022-03-11 14:51:55.097000             🧑  作者: Mango

代码示例1
' If A1 value is 2021,543
With Range("A1")
    .NumberFormat = "€#,##0.00"   ' -> €2021,54
    .NumberFormat = "$ #,##0.00"  ' -> $ 2021,54
    .NumberFormat = "#,##0.00 €"  ' -> 2021,54 €
    .NumberFormat = "#,##0€"      ' -> 2022€
  Debug.Print .NumberFormat            ' -> #,##0€
End With