How to change parts of Cells().NumberFormat
Assuming that your actual number format is
"CHF "#,##0.0000
and NOT this, which won't work:
"CHF #,##0.0000"
Dim myNF As String
myNF = ActiveCell.NumberFormat
ActiveCell.NumberFormat = Left(myNF, Len(myNF) - 2)
HTH,
Bernie
MS Excel MVP
"FSPH" wrote in message
...
Hello there,
I assign Cells().NumberFormat to deal with various currencies.
Initially NumberFormat is "$#,##0.0000", "CHF#,##0.0000", etc.
I would like to keep the currency information, however, I want to have only
2 digits (i.e., 0.00).
Format(NumberFormat), "0.00") does not work.
Any idea how I can cut off the last two digits without loosing the currency
information?
Thank you for your help.
|