• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

SpellNumber Function Without Currency In Excel

SpellNumber Function Without Currency In Excel

SpellNumber Without Currency is a manually created function through VBA Programming to change a number to written text. In other words, it converts a numeric value in excel into English words without currency.

The SpellNumber macro spells the numeric value to words as the name suggests. There is no direct function in Microsoft Excel to perform the above action.

However, as many and many users demanded, Microsoft has created and published the special VBA macro code on their website for SpellNumber with Currency.

For example;

If I need to display $ 2,345.50 as “Dollar Two Thousand Three Hundred Forty-Five and Fifty Cents” then you can use the code available on Microsoft website.

But If I need to display 2,345.50 to be displayed as ” Two Thousand Three Hundred Forty-Five Point Five ” then we need to use the SpellNumber Function Without Currency.

We have edited the same code with some changes for the required result. In this article, we will discuss the whole step by step process on how to create this SpellNumber Function Without Currency using the VBA Function.

How To Create SpellNumber Function Without Currency

Step 1: Start Microsoft Excel.

Step 2: Go To Developer Tab. Click “Visual Basic” under Code.

Step 3: Under the Insert menu, click Module.

SpellNumber Function Without Currency

Step 4: Copy and Paste the below code into the Module sheet.

Code


Option Explicit
'Main Function www.ExcelDataPro.com
Function SpellNumber1(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 "
' String representation of amount.
MyNumber = Trim(Str(MyNumber))
' Position of decimal place 0 if none.
DecimalPlace = InStr(MyNumber, ".")
' Convert cents and set MyNumber to dollar amount.
If DecimalPlace > 0 Then
Cents = GetDigit(Left(Mid(MyNumber, DecimalPlace + 1) & _
"00", 1)) & " " & GetDigit(Left(Mid(MyNumber, DecimalPlace + 2) & _
"00", 1))
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 Cents
Case ""
Cents = ""
Case "One"
Cents = " Point One "
Case Else
Cents = " Point " & Cents & " "
End Select
SpellNumber1 = Dollars & Cents
End Function
' Converts a number from 100-999 into text
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
' Converts a number from 10 to 99 into text.
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
' Converts a number from 1 to 9 into text.
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

view raw

spellnumber1.vb

hosted with ❤ by GitHub

Step 5: Save the workbook using Ctrl+S. Microsoft Excel will display the following message: “The following features cannot be saved in macro-free workbook” as you file now consists of a macro. Click “No”.

SpellNumber Function Without Currency

Following dialog box will appear. Select “Save As”.

SpellNumber Function Without Currency

From the drop-down menu select the “Save as type” as “Excel macro-enabled workbook”.

Now, your workbook consists of the new SpellNumber Function. Please keep in mind that this function will only be available in this workbook.

You need to paste the code for each workbook by following the above-mentioned steps.

Every time you will open this workbook or any other macro-enabled workbook, a security warning will appear below the ribbon. Select “Enable this content” and press enter or click “OK”.

Screenshots are given below for your ready reference:

SpellNumber Function Without Currency

SpellNumber Function Without Currency

Let us use this code in a workbook and see the results.

In column A, I have inserted the numbers you that I need to change into words.

In column B press “=” sign and write SpellNumber.

Select from the SpellNumber and give the cell reference.

SpellNumber Function Without Currency

The workbook displays the following results:

SpellNumber Function Without Currency

We thank our readers for liking, sharing and following us on different social media platforms.

If you have any queries or suggestions please share in the comment section below. I will be more than happy to assist you.

Filed Under: Microsoft Excel

You are Here: Home / Reader's Question / Microsoft Excel / SpellNumber Function Without Currency In Excel

About Shabbir Bhimani

I have worked in Excel and like to share functional excel templates at ExcelDataPro.

Comments

  1. Raja Zeeshan Khaliq says

    June 25, 2019 at 2:18 pm

    Thank You so much for helping me
    May Allah bless you

    Reply
    • Fahim Lashkaria says

      June 27, 2019 at 7:54 am

      You are welcome, brother. May Allah Bless you too.

      Reply
      • Ab says

        February 12, 2021 at 6:46 pm

        what if I want 500 cents instead of 50 cents.

        Reply
        • admin says

          February 13, 2021 at 1:19 pm

          Isn’t that 5 dollars?

          Reply
  2. JC Ripa says

    November 14, 2019 at 7:06 am

    Thanks! This works for me.

    Reply
    • Fahim Lashkaria says

      November 14, 2019 at 10:48 am

      Glad to hear that. Don’t forget to share it with your friend and on your social media.

      Reply
  3. Bidhan says

    March 5, 2020 at 4:05 pm

    Is it possible .02 (point zero two)? Please help

    Reply
    • Fahim Lashkaria says

      March 7, 2020 at 12:22 pm

      Edit code for getting 0.02

      Reply
  4. simran says

    March 23, 2020 at 9:52 pm

    thank you so much
    i was finding this formula for so long

    Reply
    • Fahim Lashkaria says

      March 24, 2020 at 12:12 pm

      Welcome, Simran. Glad to hear that it was helpful to you.

      Reply
  5. Ivy Liz says

    May 13, 2020 at 9:02 pm

    Dear,
    Can you remove the Dollars? and the decimal as xx/100?

    thankyou.

    Reply
    • Fahim Lashkaria says

      May 14, 2020 at 2:55 am

      Under Process and soon will be added to the article

      Reply
  6. Bidhan says

    July 29, 2020 at 11:12 am

    Thanks a lot sir. It is more helpful to me.

    Reply
    • Fahim Lashkaria says

      July 29, 2020 at 12:49 pm

      Glad to know that it was helpful to you.

      Reply
  7. KASIM says

    September 17, 2020 at 12:36 pm

    THANKS HAVE USED THIS VBA SCRIPT FOR NUMBERS TO WORD WITHOUT CURRENCY BUT REQUIRED WITH CURRENCY

    Reply
    • Fahim Lashkaria says

      September 17, 2020 at 12:49 pm

      Click the link below:
      Other Currencies: https://exceldatapro.com/spellnumber-function/
      Indian Currency: https://exceldatapro.com/spellnumber-indian-rupees/

      Reply
  8. vikas says

    October 23, 2020 at 4:15 pm

    After using code i face problem in my sheet i show messages of “complie error” and Syntax error

    Reply
    • Fahim Lashkaria says

      October 23, 2020 at 5:32 pm

      The code has been rectified and please follow the instructions given at the end of the article.

      Reply
  9. vikas says

    October 24, 2020 at 2:52 pm

    Thank you for your valuable reply but still I am facing same problem I think there is problem in my system or in my excel.

    Reply
    • Fahim Lashkaria says

      October 26, 2020 at 12:59 pm

      I have thoroughly checked. The issue might be in your excel options.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

ExcelDataPro

Free Excel Pro Templates

  • Glossary
    • Accounting Glossary
    • HR & Payroll Glossary
    • Tax Glossary
  • Templates
    • Accounting
      • Financial Analysis
      • Financial Statement
    • Educational
    • Taxation
      • Federal Income Tax
      • GST
      • UAE VAT
      • UK VAT
    • Human Resources
      • HR & Payroll
      • HR Metrics
    • School Management
    • Social Media
    • Sales-Marketing
    • Personal Finance
    • Other
      • Health & Fitness
  • Functions
  • Calculators
  • Home
  • Contact
  • Privacy
  • Terms

© ExcelDataPro 2025. Content Licensed Under Creative Commons with Attribution Required

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Cookie settingsACCEPT
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT