How to convert numbers to words?

  • Thread starter Thread starter B. G. Mahesh
  • Start date Start date
B

B. G. Mahesh

hi

I want to represent numbers as words. e.g. if it is 1100, I want the
narrative to say One Thousand and One Hundred

Also, if the number 1100 changes to 900, I want the narrative to
change automatically instead of me being required to run something
manually to generate the narrative.

Is this feature already available in Excel?

bg mahesh
 
Excel doesn't have such a function, but my PUP v5 add-in does (it's called
DOLLARTEXT). Download a copy from:

http://j-walk.com/ss/pup/pup5/index.htm

The custom VBA function is added to your workbook, and it will continue to
work even if you choose to not purchase PUP after the 30-day trial.

Or, do a search at www.groups.google.com. There are lots of other similar
functions available.

John Walkenbach
For Excel tips, macros, & downloads...
http://j-walk.com/ss
 
How to Convert a Numeric Value into English Words
http://support.microsoft.com/default.aspx?scid=KB;EN-US;140704

To have this done automatically, you need to use events. Some links
that explain events.

http://www.mvps.org/dmcritchie/excel/event.htm
http://www.cpearson.com/excel/events.htm
http://support.microsoft.com/default.aspx?scid=kb;en-us;213220&Product=xlw
http://support.microsoft.com/default.aspx?scid=kb;EN-US;291294
http://support.microsoft.com/default.aspx?scid=kb;EN-US;161761

This assumes that you have a range of ten cells in Column A that you
wish to apply.

(1) Right click on the WorkSheet tab.
(2) View Code.
(3) Place the following code snippet in the module.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim rngISect As Range

Set rngISect = Intersect(Target, Range("A1:A10"))

If Not rngISect Is Nothing And Target.Value <> "" Then
Application.EnableEvents = False
' Call your routine to create words from number.
Application.EnableEvents = True
End If

End Sub

HTH
Paul
 
Back
Top