Word.Tips.Net WordTips (Menu Interface)

Converting Numbers to Text

Please Note: This article is written for users of the following Microsoft Word versions: 97, 2000, 2002, and 2003. If you are using a later version (Word 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Word, click here: Converting Numbers to Text.

There are times when you need to spell numbers out. For instance, you may want to spell out "1234" as "one thousand two hundred thirty-four." Word has no built-in function that will do the conversion for you, so you are left to create a macro that will handle the conversion.

The following macro, BigCardText, will convert any number between 0 and 999,999,999. To use it, simply place the insertion point either within the number you want to convert or just to the right of the number (if it is a single digit).

Sub BigCardText()
    Dim sDigits As String
    Dim sBigStuff As String

    sBigStuff = ""

    ' Select the full number in which the insertion point is located
    Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdMove
    Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend

    ' Store the digits in a variable
    sDigits = Trim(Selection.Text)

    If Val(sDigits) > 999999 Then
        If Val(sDigits) <= 999999999 Then
            sBigStuff = Trim(Int(Str(Val(sDigits) / 1000000)))
            ' Create a field containing the big digits and
            ' the cardtext format flag
            Selection.Fields.Add Range:=Selection.Range, _
              Type:=wdFieldEmpty, Text:="= " + sBigStuff + " \* CardText", _

            ' Select the field and copy it
            Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
            sBigStuff = Selection.Text & " million "
            sDigits = Right(sDigits, 6)
        End If
    End If
    If Val(sDigits) <= 999999 Then
        ' Create a field containing the digits and the cardtext format flag
        Selection.Fields.Add Range:=Selection.Range, _
          Type:=wdFieldEmpty, Text:="= " + sDigits + " \* CardText", _

        ' Select the field and copy it
        Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
        sDigits = sBigStuff & Selection.Text

        ' Now put the words in the document
        Selection.TypeText Text:=sDigits
        Selection.TypeText Text:=" "
        MsgBox "Number too large", vbOKOnly
    End If
End Sub

When using the macro, make sure that the number you are converting does not contain extraneous information, such as dollar signs or commas. When you run BigCardText, the macro checks to see if the selected number is over one million. If it is, it first works on the portion above one million, converting it to words. Then, the value below one million is converted. The final, full wording is put together and pasted back into the document, ready for use.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (203) applies to Microsoft Word 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Word (Word 2007 and later) here: Converting Numbers to Text.

Related Tips:

Great Idea! Word is a tool to get what you really want—printed output. This means you need to make sure that Word works as well as possible with your printer, whether it is sitting on your desk or in a room down the hall. Check out WordTips: Printing and Printers today!


Comments for this tip:

Lincoln    01 Jul 2014, 07:09
There is a SpellNumber function on the MS website http://support.microsoft.com/kb/213360
awyatt    26 May 2014, 09:39
Nabil: The language used for Excel macros is VBA (Visual Basic for Applications). Other languages (such as C or C++) would not be understood by Excel.

Nabil    25 May 2014, 22:51
ms excel is not a compiler. But how does the code run in ms excel? am i able to run any type of c or c++ code in excel??
Mike    08 May 2013, 06:53
I need to know how to convert 1234.57 into words eg. One Thousand Two Hundred Thirty Four And Fifty Seven Cents.... How can I do that after?

And after using mail merge, the amount of 1234.57 became 1234.567655555555322389

How can i format it to be 1,234.57?

Steven Seim    30 Apr 2013, 14:20
Additional - The request is to deal with monetary values such as:


Convert to:

One Hundred Twenty Three Thousand, Four Hundred Fifty Six dollars and Seventy Eight Cents. (First letter caps)

Steven Seim    30 Apr 2013, 14:12
Hello. This macro is spiff, but I have a question/favor to ask.

Can this be adjusted to work with punctuation?

Example: 123,456.78

Let me know please. I could use this.

Many thanks!
Ernest Dehaan    28 Feb 2012, 22:12
Does this work on formulas? I ask because I tried and did not get any results.

If it does work in formuals where would it get inserted.

Leave your own comment:

  Notify me about new comments ONLY FOR THIS TIP
Notify me about new comments ANYWHERE ON THIS SITE
Hide my email address
*What is 3+4? (To prevent automated submissions and spam.)
          Commenting Terms

Our Company

Sharon Parq Associates, Inc.

About Tips.Net

Contact Us


Advertise with Us

Our Privacy Policy

Our Sites


Beauty and Style




DriveTips (Google Drive)

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2013)



Home Improvement

Money and Finances


Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2013)

Our Products

Premium Newsletters

Helpful E-books

Newsletter Archives


Excel Products

Word Products

Our Authors

Author Index

Write for Tips.Net

Copyright © 2014 Sharon Parq Associates, Inc.