View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bobt Bobt is offline
external usenet poster
 
Posts: 84
Default Formatting a Cell or Merged Cells

There is no built in formatting to do this, however, it's not rocket science
to write it:

Function TextMe(Real_Number As Variant) As String

Dim myString As String

'Thousands
If (Int(Real_Number / 1000) < 0) Then
myString = Int(Real_Number / 1000) & " thousand"
End If

'Get remainder
Real_Number = Real_Number - (Int(Real_Number / 1000) * 1000)

If (Int(Real_Number / 100) < 0) Then
If myString < "" Then
myString = myString & ", "
End If
myString = myString & Int(Real_Number / 100) & " hundred"
End If

'Get remainder
Real_Number = Real_Number - (Int(Real_Number / 100) * 100)

etc.

TextMe = myString

End Function


"DebbieSue" wrote:

I would like to format a cell to write out an amount of money in another
cell. Like on a Cheque. Example. $6.25 = Six and 25/100. The written portion
would change automatically when the amount changes.

Can someone tell me if formatting exists.

Thank you.