Convert Numbers to Words

Learn how to convert numbers to words in Excel using a custom VBA function, NumberToText, for invoices, financial statements, and reports.

For more formulas, check our ultimate guide.

How to convert numbers to words?

  1. Open Excel and enter a number in cell A1.
  2. Type the formula: =NumberToText(A1)
  3. Press Enter.
  4. The formula will return the number in words, e.g., “One Thousand Two Hundred Thirty-Four” for 1234.

Examples

In this example, we have a dataset in range B3:B11 containing numerical values representing monetary amounts. The goal is to convert these numerical values into their corresponding text representation in words. The formula in column D uses a custom function, NumberToText, to transform each number into a readable format, including both dollar and cent values.

Convert Numbers to Words

This conversion ensures that financial figures are clearly stated in written form, which is useful for documentation and check writing. This method provides a reliable way to clearly present financial figures in writing.

Explanation

Take a look at how the function works:

  1. Declaration – Option Explicit ensures that all variables must be explicitly declared, reducing errors.
  2. Function definition – Function NumberToText ByVal MyNumber) initializes the function.
  3. Variable setup – Defines Dollars, Cents, Temp, and DecimalPlace. It also creates an array Place() to store place values (Thousand, Million, etc.).
  4. Extract decimal position – Identifies the decimal point in MyNumber using InStr().
  5. Process cents – Extracts the cents portion and converts it using GetTens(), ensuring it’s two digits.
  6. Process whole number – Loops through MyNumber, extracting and converting three-digit groups using GetHundreds(), appending the correct place value (Thousand, Million, etc.).
  7. Construct output – Formats Dollars and Cents correctly, ensuring singular/plural word usage.
  8. Return final value – Concatenates Dollars and Cents and returns the full text equivalent.

Workaround with built-in Excel functions

In the next example, the formula breaks down the number into groups (millions, thousands, and hundreds) and processes each segment separately. It intelligently determines when to insert conjunctions like “and” and properly handles numbers in the teens (e.g., “Fourteen” instead of “Ten Four”).

Excel using a custom VBA function NumberToWords
  1. TEXT: This function formats the number with leading zeros to ensure consistent length, making it easier to extract individual digits.
  2. LEFT, MID, RIGHT: These functions extract specific digits from the formatted number to determine the hundreds, tens, and ones places.
  3. CHOOSE: This function selects the correct word representation for each digit, handling cases like “One,” “Two,” “Three,” etc.
  4. IF and AND: These logical functions help construct proper grammar by adding words like “Hundred,” “Thousand,” and “Million” where necessary.
  5. TRIM: This function removes unnecessary spaces from the final text output.

At the end of this article, you can download a practice file containing example numbers and their corresponding text representations. This will allow you to play with the formula and understand its functionality in detail.

Conclusion

By implementing the NumberToText function, you can transform numerical values into their written equivalents, which is especially useful for invoices, financial reports, and check writing. We outlined the function’s structure, including variable setup, decimal extraction, and handling of singular/plural word usage to ensure accurate text formatting.

Download the practice file.