How to Convert Numbers to Words in Excel

Converting numbers to words in Excel can be helpful when working with financial data, invoices, or legal documents. Since Excel does not have a built-in function for this, you need to use either VBA (Visual Basic for Applications) or an external add-in to achieve this functionality. In this guide, we will explore different methods to convert numbers to words in Excel.

Why Convert Numbers to Words in Excel?

  • Financial Reports: Useful for generating invoices and writing check amounts in words.
  • Legal Documents: Some legal paperwork requires numbers in words to avoid ambiguity.
  • Readability: Makes financial statements clearer and more understandable.

Method 1: Using VBA to Convert Numbers to Words

Excel does not have a built-in function to convert numbers to words, but you can use VBA (Visual Basic for Applications) to create a custom function.

Step 1: Open the VBA Editor

  1. Open Excel and press ALT + F11 to open the VBA editor.
  2. Click on Insert > Module to create a new module.

Step 2: Enter the VBA Code

Copy and paste the following VBA code into the module:

Function ConvertToWords(ByVal MyNumber)
    Dim Units As String
    Dim Teens As String
    Dim Tens As String
    Dim Place(10) As String
    Dim TempStr As String
    Dim DecimalPlace As Integer
    Dim Count As Integer
    Dim No As Double
    
    ' Define word representations for numbers
    Units = Array("", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine")
    Teens = Array("Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen")
    Tens = Array("", "", "Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety")
    Place = Array("", " Thousand", " Million", " Billion", " Trillion")
    
    ' Convert number to string
    No = Val(MyNumber)
    
    If No = 0 Then
        ConvertToWords = "Zero"
        Exit Function
    End If
    
    ' Process integer and decimal parts
    DecimalPlace = InStr(MyNumber, ".")
    If DecimalPlace > 0 Then
        MyNumber = Left(MyNumber, DecimalPlace - 1)
    End If
    
    Count = 0
    Do While MyNumber <> ""
        TempStr = ThreeDigitWord(Right(MyNumber, 3))
        If TempStr <> "" Then
            ConvertToWords = TempStr & Place(Count) & " " & ConvertToWords
        End If
        If Len(MyNumber) > 3 Then
            MyNumber = Left(MyNumber, Len(MyNumber) - 3)
        Else
            MyNumber = ""
        End If
        Count = Count + 1
    Loop
    
    ConvertToWords = Application.Trim(ConvertToWords)
End Function

Function ThreeDigitWord(ByVal MyNumber)
    Dim Result As String
    If Val(MyNumber) = 0 Then Exit Function
    If Val(MyNumber) >= 100 Then
        Result = Units(Int(MyNumber / 100)) & " Hundred "
        MyNumber = MyNumber Mod 100
    End If
    If Val(MyNumber) >= 10 And Val(MyNumber) <= 19 Then
        Result = Result & Teens(MyNumber - 10)
    Else
        Result = Result & Tens(Int(MyNumber / 10))
        If (MyNumber Mod 10) > 0 Then
            Result = Result & " " & Units(MyNumber Mod 10)
        End If
    End If
    ThreeDigitWord = Trim(Result)
End Function

Step 3: Save and Use the Function

  1. Close the VBA editor and return to Excel.
  2. Use the function in a cell like this:=ConvertToWords(A1)Replace A1 with the cell containing the number.

Method 2: Using Microsoft Excel Add-ins

Some third-party Excel add-ins can provide this functionality without VBA. You can search for and install a “Numbers to Words” add-in from Microsoft AppSource or another reliable source.

Method 3: Using Microsoft Word

If VBA is not an option, Microsoft Word provides a field code that can convert numbers to words.

  1. Open Word and press CTRL + F9 to insert field brackets {}.
  2. Type =1234 \* CardText inside the brackets (replace 1234 with your number).
  3. Press F9 to update the field and display the number in words.

Conclusion

While Excel does not have a built-in function to convert numbers to words, you can use VBA, add-ins, or Microsoft Word to accomplish this task. VBA is the most customizable and effective method for automation. Once implemented, it can significantly enhance the usability of Excel for financial and legal documentation.


Discover more from Excel Wizard

Subscribe to get the latest posts sent to your email.

Leave a Reply

Videos

Discover more from Excel Wizard

Subscribe now to keep reading and get access to the full archive.

Continue reading