Formatting a Cell or Merged Cells

  • Thread starter Thread starter DebbieSue
  • Start date Start date
D

DebbieSue

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.
 
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
 
In my case, I would need to be a rocket scientist. I used the function and I
typed in 385.25 and it gave me 3 hundred. That was it. Nothing else. I am
very new to this, so sorry if I'm a pain.

Thank you,
Debbie
 

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

Back
Top