Formatting Currency $19 million

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?
 
D

Douglas J. Steele

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top