Formatting Currency $19 million

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have several columns with currency amounts from in the hundred thousands to
the billions. It hard to read these colums so I want to format each to the
rounded million, or billion in a separate column.

So what I have is
$190,111,111.11
$2,111,111,111.11

I want a separate column with the following (still keeping the other column):
$190 million
$2 billion

Is there a formatting tool, or formula to get those results?
 
You'll have to write your own function.

Something like:

Function FormatCurrency(DollarValue As Currency) As String

Dim strTemp As String

strTemp = Format(DollarValue, "Currency")
Select Case Len(strTemp)
Case 13 To 15
FormatCurrency = Left$(strTemp, Len(strTemp) - 11) & " million"
Case Is > 15
FormatCurrency = Left$(strTemp, Len(strTemp) - 15) & " billion"
Case Else
FormatCurrency = strTemp
End Select

End Function
 
Back
Top