In this article I will demonstrate two rapid and cost-free methods to transform numerical values into English words within Excel 2019, 2016, 2013, and other editions.
Microsoft Excel is an excellent tool for performing various calculations. Initially designed to manage vast datasets, it also facilitates the swift creation of accounting records like invoices, assessments, or balance sheets.
In formal payment documents, it's essential to duplicate numeric values with their corresponding word forms. Typed numbers are harder to tamper with compared to handwritten ones. A fraudster might alter 8000 to appear as 3000, whereas changing "three" into "eight" is nearly undetectable.
Thus, what you require is not merely converting numbers to words in Excel (for instance, 123.45 to "one hundred and twenty-three, forty-five"), but also expressing amounts like $29.95 as "twenty-nine dollars and ninety-nine cents," or pounds and pence for GBP, euros and eurocents for EUR, etc.
Even the most recent versions of Excel lack a built-in feature for spelling out numbers, let alone older versions. Yet, this is when Excel truly excels. You can always enhance its functionality using formulas in all their combinations, VBA macros, or third-party add-ins.
Below you’ll discover two approaches to convert figures into words
Additionally, you might need to convert words back to numbers in Excel.Note. If you're searching for number-to-text conversion, meaning you want Excel to treat your number as text, that’s a slightly different matter. For this purpose, you can use the TEXT function or other methods outlined in How to change numbers to text in Excel.
Using the SpellNumber VBA Macro to Convert Numbers to Words
As I previously noted, Microsoft did not incorporate a tool for this task. However, upon realizing how many users required it, they developed and published the specialized VBA macro on their website. This macro performs what its name, SpellNumber, implies. All other macros I encountered are derived from the Microsoft code.
You can locate the macro referred to as the "spellnumber formula." However, it is not a formula but a macro function, more specifically, an Excel User Defined Function (UDF).
The spellnumber option can express dollars and cents. If you require a different currency, you can substitute "dollar" and "cent" with the name of your preferred currency.
If you’re not familiar with VBA, below you will find a copy of the code. If you still prefer not to or don’t have time to work through this, feel free to use this solution.
Open the workbook where you wish to spell out the numbers.
Press Alt F11 to open the Visual Basic editor window.
If multiple books are open, ensure the desired workbook is active by checking the list of projects in the upper left corner of the editor (one of the workbook elements is highlighted with blue).
In the editor menu go to Insert-> Module.
-
You should see a window named YourBook - Module1. Select all of the code in the frame below and paste it into this window.
Option Explicit 'Main Function Function SpellNumber(ByVal MyNumber) Dim Dollars, Cents, Temp Dim DecimalPlace, Count ReDim Place(9) As String Place(2) = " Thousand " Place(3) = " Million " Place(4) = " Billion " Place(5) = " Trillion " MyNumber = Trim(Str(MyNumber)) DecimalPlace = InStr(MyNumber, ".") If DecimalPlace > 0 Then Cents = GetTens(Left(Mid(MyNumber, DecimalPlace 1) &_ "00", 2)) MyNumber = Trim(Left(MyNumber, DecimalPlace - 1)) End If Count = 1 Do While MyNumber "" Temp = GetHundreds(Right(MyNumber, 3)) If Temp "" Then Dollars = Temp & Place(Count) & Dollars If Len(MyNumber) > 3 Then MyNumber = Left(MyNumber, Len(MyNumber) - 3) Else MyNumber = "" End If Count = Count 1 Loop Select Case Dollars Case "" Dollars = "No Dollars" Case "One" Dollars = "One Dollar" Case Else Dollars = Dollars & " Dollars" End Select Select Case Cents Case "" Cents = " and No Cents" Case "One" Cents = " and One Cent" Case Else Cents = " and " & Cents & " Cents" End Select SpellNumber = Dollars & Cents End Function Function GetHundreds(ByVal MyNumber) Dim Result As String If Val(MyNumber) = 0 Then Exit Function MyNumber = Right("000" & MyNumber, 3) ' Convert the hundreds place. If Mid(MyNumber, 1, 1) "0" Then Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred " End If ' Convert the tens and ones place. If Mid(MyNumber, 2, 1) "0" Then Result = Result & GetTens(Mid(MyNumber, 2)) Else Result = Result & GetDigit(Mid(MyNumber, 3)) End If GetHundreds = Result End Function Function GetTens(TensText) Dim Result As String Result = "" ' Null out the temporary function value. If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19… Select Case Val(TensText) Case 10: Result = "Ten" Case 11: Result = "Eleven" Case 12: Result = "Twelve" Case 13: Result = "Thirteen" Case 14: Result = "Fourteen" Case 15: Result = "Fifteen" Case 16: Result = "Sixteen" Case 17: Result = "Seventeen" Case 18: Result = "Eighteen" Case 19: Result = "Nineteen" Case Else End Select Else ' If value between 20-99… Select Case Val(Left(TensText, 1)) Case 2: Result = "Twenty " Case 3: Result = "Thirty " Case 4: Result = "Forty " Case 5: Result = "Fifty " Case 6: Result = "Sixty " Case 7: Result = "Seventy " Case 8: Result = "Eighty " Case 9: Result = "Ninety " Case Else End Select Result = Result & GetDigit _ (Right(TensText, 1)) ' Retrieve ones place. End If GetTens = Result End Function Function GetDigit(Digit) Select Case Val(Digit) Case 1: GetDigit = "One" Case 2: GetDigit = "Two" Case 3: GetDigit = "Three" Case 4: GetDigit = "Four" Case 5: GetDigit = "Five" Case 6: GetDigit = "Six" Case 7: GetDigit = "Seven" Case 8: GetDigit = "Eight" Case 9: GetDigit = "Nine" Case Else: GetDigit = "" End Select End Function
-
Press Ctrl S to save the updated workbook. You will need to resave your workbook. When you attempt to save the workbook with a macro, you'll receive the message "The following features cannot be saved in macro-free workbook"
Click No. When you encounter a new dialog, choose the Save as option. In the field "Save as type" pick the option "Excel macro-enabled workbook".
Applying the SpellNumber macro in your worksheets
Now you can utilize the function SpellNumber in your Excel documents. Enter =SpellNumber(A2)
into the
The above is the detailed content of How to convert number to words in Excel. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

MicrosoftTeamsusesalotofmemoryprimarilybecauseitisbuiltonElectron,whichrunsmultipleChromium-basedprocessesfordifferentfeatureslikechat,videocalls,andbackgroundsyncing.1.Eachfunctionoperateslikeaseparatebrowsertab,increasingRAMusage.2.Videocallswithef

Quick Links Let Copilot Determine Which Table to Manipu

MicrosoftTeams’freeversionlimitsmeetingsto60minutes.1.Thisappliestomeetingswithexternalparticipantsorwithinanorganization.2.Thelimitdoesnotaffectinternalmeetingswhereallusersareunderthesameorganization.3.Workaroundsincludeendingandrestartingthemeetin

Grouping by month in Excel Pivot Table requires you to make sure that the date is formatted correctly, then insert the Pivot Table and add the date field, and finally right-click the group to select "Month" aggregation. If you encounter problems, check whether it is a standard date format and the data range are reasonable, and adjust the number format to correctly display the month.

Microsoft Teams is not complicated to use, you can get started by mastering the basic operations. To create a team, you can click the "Team" tab → "Join or Create Team" → "Create Team", fill in the information and invite members; when you receive an invitation, click the link to join. To create a new team, you can choose to be public or private. To exit the team, you can right-click to select "Leave Team". Daily communication can be initiated on the "Chat" tab, click the phone icon to make voice or video calls, and the meeting can be initiated through the "Conference" button on the chat interface. The channel is used for classified discussions, supports file upload, multi-person collaboration and version control. It is recommended to place important information in the channel file tab for reference.

Quick Links Check the File's AutoSave Status

The tutorial shows how to toggle light and dark mode in different Outlook applications, and how to keep a white reading pane in black theme. If you frequently work with your email late at night, Outlook dark mode can reduce eye strain and

To set up the repeating headers per page when Excel prints, use the "Top Title Row" feature. Specific steps: 1. Open the Excel file and click the "Page Layout" tab; 2. Click the "Print Title" button; 3. Select "Top Title Line" in the pop-up window and select the line to be repeated (such as line 1); 4. Click "OK" to complete the settings. Notes include: only visible effects when printing preview or actual printing, avoid selecting too many title lines to affect the display of the text, different worksheets need to be set separately, ExcelOnline does not support this function, requires local version, Mac version operation is similar, but the interface is slightly different.
