• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Convert Numbers (Currency) to Words With Excel VBA

You are here: Home / Excel VBA / Convert Numbers (Currency) to Words With Excel VBA
Convert Numbers (Currency) to Words With Excel VBA
February 7, 2014 by Philip Treacy

We get requests now and again asking how to convert numbers to words (or convert currency) e.g. 123.45 becomes One Hundred Twenty Three Dollars and Forty Five Cents. Excel doesn’t provide a function to do this so I’m going to write my own.

Converting Numbers to Words Animation

Microsoft does provide some VBA code which I will use as my starting point, and I have seen other examples, but these examples only allow for one currency.

My code allows you to specify what currency you use, and it takes into account regional variations of the decimal separator. Some countries use . (period or full stop) and some use , (comma).

I've created two workbooks that you can use. The first is for use with currency. The second is for general use and will convert the number to a string of words. You can then join that string with whatever you want.

For example, 23,482 could be converted to Twenty Three Thousand Four Hundred Eighty Two people live in this town.

By joining a string like " people live in this town." to the output from the conversion function, you can use the function however you want.

Download the Code

Sample workbooks with working VBA code can be downloaded from the bottom of this post - just scroll down to the Download Section.

User Defined Function

The code is written as a User Defined Function or UDF. This is just like a regular Excel function that you might use like SUM() and is used in a similar way.

The function is called NumToWords() and you use it in a worksheet by passing a number, or a number stored as text, to it

Passing a number to the function

or you can use it by referencing another cell like this :

Passing a cell reference to the function

The function will take either a string (text) or a number as input and it returns a string (text).

Excel's Number Limitation

Excel only displays a maximum of 15 digits for a number typed into a cell. Any digits after that are changed to 0.

Excel's 15 Digit Number Limitation

This is a problem if you are working with things like credit card numbers which are typically 16 digits long. You'll need to use a nifty formula explained in this custom cell format post to solve this particular problem.

This limitation is also an issue if you are working with numbers in the 10's or 100's of trillions. Let's say you want to work out the world's gross domestic product (GDP) for the last 10 years, which will be into the 100's of trillions.

What you have to do is store the number as text. Doing this will allow you to work with numbers up to 999,999,999,999,999.99 which is the maximum currently supported by this function.

Other Currencies

If you are not using a dollar as your currency as we do here in Australia, then you can change the currency to whatever you want. Note : this code doesn’t distinguish between countries so you can leave the settings at dollar if you live in the USA, Canada or anywhere else using dollar.

At the top of the code there’s a section where you type in the name of your currency unit and the name of your subunit. For example

Converting different currencies into words

Sub Units of currency

You may have noticed that I’ve allowed for a special case where the name for a single subunit is different to more than one, as is the case with Pounds Sterling.

One subunit is called a penny, more than one would be referred to as pence. So £10.01 would be Ten Pounds and One Penny but £10.02 would be Ten Pounds and Two Pence. This works in a similar way for 2 cents or just 1 cent.

If you use the same term for one and more than one of your subunit then just change the code to reflect this.

Decimal Separator

If you use a , (comma) as your decimal separator then in the same area of code shown above, change the character used for the DecimalSeparator variable.

Update 1 - Spanish Translation

I received a translation of this code into Spanish from Pablo Baez. He said he wanted to share it with his brother in South America, so here it is - thanks Pablo.

The name of the function in Spanish is NumEnPalabras()

Converting Numbers to Words in Spanish

If you have translated the code into other languages, or would like some assistance to do so, please get in touch

Update 2 - Whole Numbers

I also received a request from Khaled Naser Almarwa in Saudi Arabia, asking if the code could be altered to output only whole numbers. Yes it can and you can get this new code here.

This function is called NumToWholeWords()

Converting Numbers to Whole Words


Update 3 - Fractional Sub Units

Chastine asked if the output could be of the form :

One Thousand Two Hundred Dollars and 50/100 only

Yes it can and the new function for this is called NumToWordsFrac()

Download the Sample Workbooks

Enter your email address below to download the workbook with the data and code from this post.

By submitting your email address you agree that we can email you our Excel newsletter.
Please enter a valid email address.

NumToWords-Currency.xlsm.
NumToWords-General-Use.xlsm.
Numeros-En-Palabras.xlsm
NumToWords-Whole-Numbers.xlsm
NumToWords-Fractional-Units.xlsm

Convert Numbers (Currency) to Words With Excel VBA

More Excel VBA Posts

automating and emailing pivot table reports

Automating and Emailing Pivot Table Reports

Automate the creation and distribution of pivot table reports with some VBA. Send reports to multiple email recipients using Outlook.
Checking values in range objects with vba

Checking Values in Range Objects With VBA

Use built in tools or your own code to examine the values contained within Range objects in VBA. Sample code to download.
Static variables in VBA

Static Variables in VBA

Variables normally cease to exist once your Sub or Function has ended. But Static Variables allow you to preserve values after your code has finished.
save chart as image

Save Chart as Image

List all the charts in your workbook then select the ones you want to save as either PNG or JPG. Sample workbook and code to download
Clearing Downstream Dependent Data Validation Lists

Clear Downstream Dependent Data Validation Lists

Change one of your data validation lists and clear the values in the other data validation lists dependent on your first choice.
Excel Status Bar

Excel Status Bar

Use the Excel Status Bar to send messages to your users and to show a progress bar for your VBA code
Progress Bar for Excel VBA

Excel Progress Bar for VBA

Create your own progress bar for VBA in Excel. Use it to show that your code is still running, and how long before it finishes.
error handling in vba

Error Handling in VBA

Understand how Excel VBA generates errors, how to control what Excel does when an error occurs, and how to write your own error handling routines.
Finding File Metadata Using FileSystemObject

Finding File Meta Data Using FileSystemObject

Find file meta data like the creation date, last modified date and file size using Windows FileSystemObject in Excel VBA
Automatically Add Items to Data Validation List

Automatically Add Items to Data Validation List

Automatically Add Items to Data Validation List by typing in the new data. Then sort the source list for bonus points

More Excel VBA Posts

Display All Matches from Search in Userform ListBox

Display All Matches from Search in Userform ListBox

Search a range for all partial and full matches of a string, and display matching records (entire rows) in a userform listbox. Sample code and userform.
animating excel charts

Animating Excel Charts

Use animation correctly to enhance the story your data is telling. Don't animate your chart just for some eye candy. Sample code and workbook to download.
dynamic data validation lists in userforms

Dynamic Data Validation Lists in Userforms

Data validation lists using the same source that are dynamically modified to prevent the same choice being made in each list.
show report filter pages for power pivot pivottables

Show Report Filter Pages for Power Pivot PivotTables

PivotTables created from Power Pivot can't use the 'Show Report Filter Pages' option. But this piece of VBA allows you to do just that.
charting real time data in excel

Charting Real Time Data in Excel

Receive data in real time and chart the data as it arrives. Can be used to chart things like stock prices or sensor readings. Sample code and workbook
select multiple items from drop down data validation list

Select Multiple Items from Drop Down (Data Validation) List

Choose multiple items from a data validation (drop down) list and store them all in the same cell. Sample workbook with working VBA.
Excel Calendar (Date Picker) to Use in Worksheets and Userforms

Multi-Language Excel Calendar (Date Picker) for Worksheets and Userforms

Easy to use, highly customizable and multi-language. This date picker is implemented as a userform that is simple to integrate into your workbook.
automating and emailing pivot table reports

Automating and Emailing Pivot Table Reports

Automate the creation and distribution of pivot table reports with some VBA. Send reports to multiple email recipients using Outlook.
search for data with userform

Searching for Data With a User Form

Search a list of records (like a table) using a user form, and then populate the fields of the search form when the record is found.
Checking values in range objects with vba

Checking Values in Range Objects With VBA

Use built in tools or your own code to examine the values contained within Range objects in VBA. Sample code to download.


Category: Excel VBATag: Excel VBA
Previous Post:Curse You Excel CursorCurse You Excel Cursor
Next Post:Who Needs Word When Excel Has Got Fill Justify TextWho Needs Word When Excel Has Got Fill Justify Text

Reader Interactions

Comments

  1. Kristel

    October 27, 2020 at 5:04 pm

    Hi I’m getting hard time to becuase the amount of decimal point was not rounded off how can I edit the code for this?
    thanks

    Reply
    • Philip Treacy

      October 27, 2020 at 7:53 pm

      Hi Kristel,

      Do the rounding in Excel. Wrap the function in one of the rounding functions e.g.

      =NumToWords(ROUND())

      Regards

      Phil

      Reply
      • Kristel

        October 29, 2020 at 8:49 am

        I’m using spell number code in VBA
        i need to get the round off number in the decimal point e.g

        356.8795 = Three Hundred Fifty Six & 87/100 only

        and it should be like this

        356.8795 = Three Hundred Fifty Six & 88/100 only

        Reply
        • Philip Treacy

          October 29, 2020 at 3:27 pm

          Hi Kristel,

          Use ROUNDUP

          =numtowordsfrac(ROUNDUP(A1,2))

          where your number is in cell A1

          Regards

          Phil

          Reply
  2. Sarfaraz

    June 11, 2020 at 1:11 am

    Hi.
    My Currency is Bahrain Dinars.
    Example: 125.425 = One hundred Twenty Five Dinars And Four Hundred Twenty Five Fils Only.

    Can you please give me this code

    Reply
    • Catalin Bombea

      June 11, 2020 at 4:04 am

      Hi Sarfaraz,
      You have to dive into the code and replace the unit/subunit names, you have instructions in the article. We do not know how to translate all necessary parameters.
      Please review the instructions. Use our forum to upload your translations, we will help you implement them.

      Reply
  3. Vincent.Wu

    February 29, 2020 at 8:06 pm

    Hi, Catalin Bombea,
    I use your code and changed only the currency to Pounds and Piastres, but after use the NumToWords() Function, it only shows =#Names?
    I don’t know what it should be like. My Excel version is Excel 2016.

    Reply
    • Catalin Bombea

      March 2, 2020 at 2:55 am

      Hi Vincent,
      Can you upload on our forum the file with your changes to see what’s wrong?

      Reply
  4. Cheapros

    January 8, 2020 at 4:10 pm

    Hi
    i would like to translate from english to Khmer. Can you help me?

    Reply
    • Catalin Bombea

      January 8, 2020 at 5:16 pm

      Hi,
      Please start a new topic on our forum, we can help you there. You will be able to upload a sample file with your code, just create a new topic after sign-up.

      Reply
  5. Arnas

    November 18, 2019 at 7:54 pm

    Hey, thanks a lot for the fractions formula. But could you help me to edit the Fractions formula so a number like 10,01 EUR is showed as 1/100, not 01/100? I just cannot figure out how to edit the code.

    Reply
    • Catalin Bombea

      November 18, 2019 at 8:03 pm

      Hi Arnas,
      Replace this code:
      SubUnits = ” and ” & SubUnits & SubUnitName
      with:
      SubUnits = ” and ” & Val(SubUnits) & SubUnitName

      Reply
  6. Sheilla H. Mallorca

    November 8, 2019 at 2:27 pm

    Hi Sir Philip,

    I’m trying to copy your formulas but all is unsuccessful, can you give me the formula or option explicit on how to configure amount in words in Philippine Currency?
    Example: 26,114.73= Twenty Six Thousand One Hundred Fourteen and 73/100 Only
    10,000.00= Ten Thousand Pesos Only

    Hope to receive your response the soonest.

    Thank you very much

    Reply
    • Catalin Bombea

      November 15, 2019 at 4:48 pm

      Hi Sheilla,
      Try the fractional version, you can find it here.
      Of course, you have to edit the units and sub units names.

      Reply
      • RICO SENIS CERENO

        March 10, 2020 at 6:32 pm

        this working thank you very much

        Reply
        • Catalin Bombea

          March 10, 2020 at 8:37 pm

          You’re welcome, nice to hear you managed to make it work

          Reply
  7. Chris Nelson

    November 8, 2019 at 5:53 am

    I like this function very much. I’ve added slightly to it so that it will properly (grammatically) include necessary hyphens where they are required. See if you agree:

    …
    ElseIf Val(TensText) Mod 10 = 0 Then ‘ If value is 20, 30, 40 … up to 90…

    Select Case Val(TensText)
    Case 20: Result = “Twenty ”
    Case 30: Result = “Thirty ”
    Case 40: Result = “Forty ”
    Case 50: Result = “Fifty ”
    Case 60: Result = “Sixty ”
    Case 70: Result = “Seventy ”
    Case 80: Result = “Eighty ”
    Case 90: Result = “Ninety ”
    Case Else
    End Select

    Else ‘ If value between 21-99, exclusive of the break points above…

    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

    Reply
    • Philip Treacy

      November 8, 2019 at 9:49 am

      Thanks Chris. If the hyphens work for your particular situation then great.

      Regards

      Phil

      Reply
  8. Stephanie

    September 14, 2019 at 5:00 am

    Do you have a code that doesn’t insert Dollars and Cents. I need to do a project that has to do with shares not currency so i just need whole numbers converted to words.

    Thanks

    Reply
    • Stephanie

      September 14, 2019 at 6:01 am

      I actually found one of your files and deleted what i needed to make this happen. Thanks!

      Reply
  9. UEMSH

    August 31, 2019 at 11:45 pm

    Dear sir please

    let us know the programme for after decimal three digit
    e.g.100.123

    after decimal one hundred twenty three baisa only

    Reply
    • Philip Treacy

      September 3, 2019 at 10:16 am

      Hi,

      This has already been answered a couple of times in the comments – see this one

      https://www.myonlinetraininghub.com/convert-numbers-currency-to-words-with-excel-vba#comment-40205

      Regards

      Phil

      Reply
  10. A Ray

    July 21, 2019 at 3:01 am

    Can you please make a code for Indian Rupees in Whole numbers? Please note that Trillion, Million and Billion is not used in Indian Currency system. Comma for separation is also used in a different manner. For example the number 1234567899000 in Rupees is written as ₹ 123456,78,99,000 in short and Rupees One Lakh Twenty Three Thousand Four Hundred Fifty Six Crore Seventy Eight Lakh Ninety Nine Thousand. Use of the word ‘Only’ at the end has become obsolete now-a-days.

    Can you please post a code which converts ₹ 123456,78,99,000 as Rupees One Lakh Twenty Three Thousand Four Hundred Fifty Six Crore Seventy Eight Lakh Ninety Nine Thousand in words.

    Thanks in advance and Regards.

    Reply
    • Catalin Bombea

      July 22, 2019 at 3:03 am

      Hi,
      Can you please post a new topic on our forum for this? I guess you followed the instructions from this article for rupee, and you updated the millions, billions section of the code with your specific text:
      Indian Rupee
      ‘ Change these as required **************************
      UnitName = “Rupee” ‘ NOTE : This is singular
      SubUnitName = “Paisa” ‘ NOTE : This is plural
      SubUnitSingularName = “Paisa” ‘ NOTE : This is singular
      DecimalSeparator = “.”
      ‘ ***************************************************

      Reply
      • A Ray

        July 24, 2019 at 12:13 am

        I have tried this following the instructions given in this post but it did not meet my purpose. I have created a topic on this in the Forum which now awaits moderation.

        Reply
        • Pratik Karani

          August 22, 2019 at 12:41 am

          Sir,

          I too require in ruppes as mentioned by Ray, i followed all steps given in forum below, but it does not yield results.

          Can you help us with indian version

          Reply
          • Catalin Bombea

            August 22, 2019 at 12:59 am

            Hi Pratik,
            See this post started by Ray on our forum.

  11. Ayush Ruel Das

    June 4, 2019 at 8:06 pm

    Can you please tell me how to use the same code if I want the text in hindi.

    Reply
    • Philip Treacy

      June 5, 2019 at 12:36 pm

      Sorry, I don’t speak Hindi so I don’t know how to translate it.

      Reply
      • SUBHASIS DE

        July 1, 2019 at 9:11 pm

        numtowords not work in my excel

        Reply
        • Catalin Bombea

          July 3, 2019 at 3:35 pm

          Hi,
          Make sure you allow macros to run.

          Reply
  12. houcine

    May 18, 2019 at 7:55 pm

    I need to convert a number with three digits after the decimal point, can you help me?

    Reply
    • Catalin Bombea

      May 21, 2019 at 2:19 am

      Hi,
      Please use our forum, you will be able to upload there a sample file. Make sure you prepare all details for your currency.

      Reply
  13. Emiko

    May 18, 2019 at 2:46 pm

    Hi, I have tried to modify some of the codes and I did it.

    But, still have one question.

    How to make like this:
    0.92 –> Ninety Two Cents
    Currently, it shows up as “And Ninety Two Cents”. How to throw away the “And” at the front if there is none in the Units?

    Reply
    • Catalin Bombea

      May 21, 2019 at 2:43 am

      Hi Emiko,
      What’s wrong with the original version? The result is: No Dollars and Ninety Two Cents.
      We don’t know what changes you made to advice, but you can try again the original version, adjusting the cell formula instead:
      =Substitute(NumToWords(A1),”No Dollars and “,””)

      Reply
  14. joy

    May 5, 2019 at 5:28 pm

    Can you make Dirhams

    Reply
    • Catalin Bombea

      May 7, 2019 at 1:02 am

      Hi Joy,
      What do you mean? Forge them? (just kidding)
      Please use our forum to upload your currency details, I do not know those details.
      Have you tried to follow the instructions provided in this article, to change the currency?

      Reply
  15. chixie

    April 21, 2019 at 7:33 pm

    hi, thanks a lot for this..this is a big help.but i got one problem..why is my “cents”not spelled?i mean when i typed in (180.50) it appeared one hundred eighty and no cents…what seems to be the problem here?

    Reply
    • Catalin Bombea

      April 23, 2019 at 1:15 pm

      Hi,
      I tested the sample file available for download, and here is what I got:
      180,5 Eighteen Thousand Dollars and No Cents
      180.50 One Hundred Eighty Dollars and Fifty Cents
      If you have “.” as decimal separator and you type a comma instead of a dot, the result will have “No Cents”
      If this is not the case, I’m not seeing any other reason for that result you mentioned, you will have to provide your sample file where we can see that result, to check it. Use our forum for upload.

      Reply
  16. Bland

    April 4, 2019 at 5:28 pm

    Dear Catalin thank you for your help. i inserted the code you provided to me under “Change these as required”. but i faced some errors. Is it possible to provide me the full code for this module. thanks in advanced.

    Reply
    • Catalin Bombea

      April 5, 2019 at 4:35 am

      Hi Bland,
      I don’t have other code than the code provided in this article. As mentioned before, if you need personaliation, start a new topic on our forum where we can upload and test files.
      See you there.
      Cheers,
      Catalin

      Reply
  17. Bland

    April 3, 2019 at 8:44 pm

    hello can we add multiple currencies to this module example Dollars, Euro, pound, … thanks

    Reply
    • Catalin Bombea

      April 4, 2019 at 3:48 pm

      Hi,
      Yes, you can copy that module and create different versions, there are already 3 examples for Pounds, Yes, Rupee, and a spanish translation. You can add a second argument to specify the currency:
      =NumToWords(A1,”USD”)
      For this, you have to add conditional logic:
      ‘defaults:
      UnitName = “Dollar”
      SubUnitName = “Cents”
      SubUnitSingularName = “Cent”
      DecimalSeparator = “.”
      ReDim Place(9) As String
      Place(2) = ” Thousand “: Place(3) = ” Million “: Place(4) = ” Billion “: Place(5) = ” Trillion ”
      If Currency=”Pound” then
      UnitName = “Pound”: SubUnitName = “Pence”: SubUnitSingularName = “Penny”: DecimalSeparator = “.”
      Place(2) = ” Thousand “: Place(3) = ” Million “: Place(4) = ” Billion “: Place(5) = ” Trillion ”
      End IF
      If Currency=”Yen” then
      UnitName = “Yen”: SubUnitName = “Sen”: SubUnitSingularName = “Sen”: DecimalSeparator = “.”
      Place(2) = ” Thousand “: Place(3) = ” Million “: Place(4) = ” Billion “: Place(5) = ” Trillion ” ‘change if needed
      End IF
      If Currency=”Rupee” then
      UnitName = “Rupee”: SubUnitName = “Paisa”: SubUnitSingularName = “Paisa”: DecimalSeparator = “.”
      Place(2) = ” Thousand “: Place(3) = ” Million “: Place(4) = ” Billion “: Place(5) = ” Trillion ” ‘change if needed
      End IF
      In the same way, using a Select Case, you might need to translate the GetHundreds, GetTens, GetDigit functions.
      If you’re interested, you can open a new topic on our forum, where our members can help building such modifications.

      Reply
  18. shiva

    February 13, 2019 at 2:07 pm

    Hi,

    I am trying to convert the numbers in words into lakh.

    123455.10 For example(One Lakh Twenty-Three Thousand and Fifty-Five Dollars and Ten Cents)

    But I am not able to convert exactly what I want. It is Converting into (One Hundred and Twenty Three and Four Hundred and Fifty-Five)

    Please help

    Reply
    • Catalin Bombea

      February 13, 2019 at 5:29 pm

      Hi Shiva,
      Try posting some examples and your code on our forum, we will try to help you.
      Cheers,
      Catalin

      Reply
  19. Richards

    December 29, 2018 at 1:54 am

    hello, your article has been very educating. How can i adapt this to Naira & kobo?

    Reply
    • Philip Treacy

      December 31, 2018 at 1:08 pm

      Hi,

      Change the UnitName, SubUnitName and SubUnitSingularName to Naira, Kobos and Kobo.

      Regards

      Phil

      Reply
  20. KETAN JOSHI

    December 27, 2018 at 4:00 pm

    SUPERB

    Reply
    • Philip Treacy

      December 27, 2018 at 6:20 pm

      Thanks Ketan

      Reply
  21. Belle Touse

    December 19, 2018 at 12:20 pm

    Hello Philip,

    The word conversion is sometimes resulting in a false number. This is only happening in the cents section and only on a particular worksheet, and it happened 4 out of 12 times per worksheet. For example, $366.13 is resulting in Three Hundred Sixty-Six Dollars and Twelve Cents. Can you please assist? Thanks.

    Reply
    • Philip Treacy

      December 19, 2018 at 2:42 pm

      hi Belle,

      Can you please supply your workbook? You can open a Forum topic and attach the file there.

      Thanks

      Phil

      Reply
      • Chris Nelson

        November 8, 2019 at 6:10 am

        I’m guessing that’s going to be due to a “failure to round” error in the value being examined. That is, the original value is, let’s say, 1.125, which the function “sees” as “one dollar plus twelve cents”, ignoring what follows the second decimal place. My immediate suggestion would be to examine the formula that creates the value to be converted to be certain that it “ends” at the second decimal point. In other words: =Round( value, 2) and see if the NumToWords function then produces the expected “one dollar and thirteen cents”.

        Reply
  22. Nilesh

    November 23, 2018 at 4:08 pm

    Hi,
    How to put Currency name in beginning , in sentence.

    Example of $135.20
    Dollars One Hundred Thirty Five, and Cents 20 Only.

    Reply
    • Philip Treacy

      November 25, 2018 at 3:42 pm

      Replace the last two Select statements with this

          Select Case Units
              
              Case ""
                  Units = "No " & UnitName & "s"
              
              Case "One"
                  Units = UnitName & " One "
              
              Case Else
                  Units = UnitName & "s " & Units
                  
          End Select
          
          Select Case SubUnits
          
              Case ""
                  SubUnits = " and No " & SubUnitName
          
              Case "One"
                  SubUnits = " " & SubUnitSingularName & " and One "
      
              Case Else
                  SubUnits = " and " & SubUnitName & " " & SubUnits
                  
          End Select  
      
      

      and if you want “Only” at the end, replace the last line with this

         NumToWords = Application.Trim(Units & SubUnits) & " Only"
      

      Regards

      Phil

      Reply
      • Nilesh

        November 26, 2018 at 11:25 pm

        Thanks Philips,

        Please put full formula, with above changes.

        Regards
        Nilesh

        Reply
        • Philip Treacy

          November 27, 2018 at 10:51 am

          Hi Nilesh,

          You just need to copy/paste the code I provided. Replace the last 2 Select statements. Search fro the code that starts ‘Select Case Units’. That’s whereto start.

          Regards

          Phil

          Reply
          • Nilesh

            November 27, 2018 at 7:11 pm

            Hey Phil,
            Thanks a lot, Its Done.

            Appreciate your help.

            Cheers!
            Nilesh

          • Philip Treacy

            November 28, 2018 at 2:08 pm

            You’re welcome.

  23. Vieng

    November 12, 2018 at 2:15 am

    Excuse me, may i ask why it can not convert to Lao Language for this code when i code in lao language it shows ???? like this. Do u have any suggestions?

    I look forward to hearing from you
    Thank you

    Reply
    • Catalin Bombea

      November 13, 2018 at 1:56 pm

      Hi Vieng,
      Can you upload what you did on our forum(create a new topic after sign-up)? We cannot replicate what you are saying.
      Thank you

      Reply
  24. Syed

    August 19, 2018 at 6:53 pm

    I have a Purchase Order Worksheet in which I have to deal with Multiple currencies. I do have a drop down list of Currencies & Spell Number Addin for conversion from number to words but it does not have the currency name and subunit name only whole numbers
    I need a macro so that if i select a currency Type from my drop down list then it should convert to text with the corresponding currency name and subunit name in words.

    Hope to get an early reply from you

    Reply
    • Catalin Bombea

      August 19, 2018 at 9:45 pm

      Hi Syed,
      Please upload a sample file with your structure on our forum, it’s the best way to get an answer for your problem. Open a new topic after sign-in.
      Catalin

      Reply
    • Ken

      October 11, 2018 at 11:58 pm

      Might be easier to use an IF statement
      for instance if B4 is the cell that has the currency identy and B5 is the number you want to convert then you can do something like this:

      like =IF(B4=”Dollars”,NumToWords(B5),IF(B4=”Yen”,NumToYen(B5)… etc…

      You would have to trite a separate macro for each currency, maybe there is an easier way to do it?

      Reply
      • Catalin Bombea

        October 12, 2018 at 2:58 pm

        Hi Ken,
        There can be many ways to do that. For example, all currency related parameters can be stored into a dictionary, using the currency name as the key, this way many currencies can be used in the same code.
        The function can take the currency name as an argument, like: NumToWords(B5, “Yen”), or NumToWords(B5, “USD”), or just NumToWords(B5, B4), if the B4 cell contains the currency name, no need for nested IF’s.
        Catalin

        Reply
        • Syed

          August 22, 2019 at 3:02 am

          Please show me few ways how can that be done. It seems Ken is correct that we have to write separate macros for each of the currencies with corresponding Unit & Sub Unit names. But I don’t know how to make that macro work depending upon my currency selection.

          Help is really appreciated

          Reply
          • Catalin Bombea

            August 22, 2019 at 4:09 pm

            Hi Syed,
            You can do this: Make sure that the function has 2 arguments, currency as the second argument:
            Function NumToWords(ByVal MyNumber, Optional Byval Curr as String=”USD”) ‘if the currency is not specified, USD will be the default, change as needed
            Replace the following code:
            ‘ Change these as required **************************
            UnitName = “Dollar” ‘ NOTE : This is singular
            SubUnitName = “Cents” ‘ NOTE : This is plural
            SubUnitSingularName = “Cent” ‘ NOTE : This is singular
            DecimalSeparator = “.”
            ‘ ***************************************************

            With:


            Select Case Curr
            Case Is ="USD"
            ' Change these as required **************************
            UnitName = "Dollar" ' NOTE : This is singular
            SubUnitName = "Cents" ' NOTE : This is plural
            SubUnitSingularName = "Cent" ' NOTE : This is singular
            DecimalSeparator = "."
            ' ***************************************************
            Case Is ="GBP"
            ' Change these as required **************************
            UnitName = "Pound" ' NOTE : This is singular
            SubUnitName = "Pence" ' NOTE : This is plural
            SubUnitSingularName = "Penny" ' NOTE : This is singular
            DecimalSeparator = "."
            ' ***************************************************
            Case Is ="YEN"

            ' Change these as required **************************
            UnitName = "Yen" ' NOTE : This is singular
            SubUnitName = "Sen" ' NOTE : This is plural
            SubUnitSingularName = "Sen" ' NOTE : This is singular
            DecimalSeparator = "."
            ' ***************************************************

            Case is ="RUP"

            ' Change these as required **************************
            UnitName = "Rupee" ' NOTE : This is singular
            SubUnitName = "Paisa" ' NOTE : This is plural
            SubUnitSingularName = "Paisa" ' NOTE : This is singular
            DecimalSeparator = "."
            ' ***************************************************
            End Select

            Now, all you have to do is to call the function passing the currency you want:
            =NumToWords(A1,”GBP”)
            Because the default is USD, this will work without specifying the currency, will return the number in USD: =NumToWords(A1)

          • Syed

            August 28, 2019 at 9:26 pm

            Thanks a lot dear. This has really helped me a lot to create my VBA code for multi Currency to Word.

            Also the suggestion by Catalin as below is great.

            NumToWords(B5, B4), if the B4 cell contains the currency name, no need for nested IF’s

          • Catalin Bombea

            August 29, 2019 at 2:07 pm

            Sounds great Syed, glad to hear you managed to make it work.
            Cheers,
            Catalin

  25. S

    August 7, 2018 at 7:56 pm

    Thank you so much Phil, this is much better than the tutorial on Microsoft website.
    It works like a treat!

    Reply
    • Philip Treacy

      August 8, 2018 at 8:29 am

      Thanks, glad it was useful to you

      Reply
  26. Yatiyana Wimalabuddhi

    August 5, 2018 at 11:36 pm

    NumToWords() function does not work in my Windows 7. Help me.

    Reply
    • Philip Treacy

      August 5, 2018 at 11:45 pm

      That isn’t enough information to help you.

      Please post on the forum and supply screen shots and error messages.

      Regards

      Phil

      Reply
  27. Musthafa

    June 17, 2018 at 6:25 pm

    Please provide me Number to Dhirham in Excel. I hope it will inbox my mail soon.

    Reply
    • Philip Treacy

      June 18, 2018 at 9:02 am

      Hi,

      Have you read the section on Other Currencies and tried modifying the code to work for dhirhams?

      Phil

      Reply
  28. ADAM

    May 24, 2018 at 3:19 am

    Hi,

    I try to modified the code, but when the number with no cents, it still show “and cents”

    how to make like this:

    RM 1,024.00 –> Ringgit Malaysia: one thousand twenty four ringgit only
    RM 1,024.25 –> Ringgit Malaysia: one thousand twenty four ringgit and twenty five cents only
    RM 10.00 –> Ringgit Malaysia: Ten ringgit only
    RM 0.92 –> Ringgit Malaysia: Ninety two cent only

    I had adjust some in VB script

    also adjust function like this =”Ringgit Malaysia: ” & NumToWords(B52) & ” Only”

    thanks
    L.E.:
    i use excel 2013.. after add new module.. how to save the module with script? after I close excel, the module lost..

    https://support.microsoft.com/en-gb/help/213360/how-to-convert-a-numeric-value-into-english-words-in-excel

    I must save excel in xlsm
    Select Case SubUnits

    Case “”
    SubUnits = “”

    solved =)

    Reply
    • Catalin Bombea

      May 24, 2018 at 3:02 pm

      Hi Adam,
      Glad to hear you found your way through.
      One thing doesn’t look right:
      Select Case SubUnits
      Case “”
      SubUnits = “”
      This is practically saying that : If SubUnits=”” then SubUnits=””
      So it’s a useless code, does absolutely nothing.
      Cheers,
      Catalin

      Reply
  29. Solange El Khoury

    October 30, 2017 at 10:56 pm

    Hello,

    Please I need to convert number into words using the Lebanese Pounds currency (LBP) with 2 decimal digits

    example: 151500.50 = LBP One Hundred Fifty One Thousand Five Hundred & 50/100 only.

    The numbers could get into millions but not more than that.

    Could you help me with this matter.

    Thank you.

    Solange

    Reply
    • Catalin Bombea

      November 1, 2017 at 2:01 am

      Hi Solange,
      Please read Update 3 from this page – Fractional Sub Units, it’s exactly the same format you need.
      Catalin

      Reply
  30. Daniel Murray

    August 2, 2017 at 10:52 am

    Hi Catalin,

    Great routine and thanks for sharing…

    I am working with the spanish version of NumToWords() and a modifed version of NumToWordsFrac() for spanish as well.

    I would like the ‘Unit Name’ to appear at the end, first letter capitalized, all the rest lower case and omitting the “con” (ie. 125.00 = Ciento veinte y cinco 00/100 Dólares);

    A special case is also needed for 100.00 which should read “Cien 00/100 Dólares”

    Could you advise where and how to tweak your code for the above.

    Many thanks and kind regards

    Reply
    • Catalin Bombea

      August 2, 2017 at 2:47 pm

      Hi Daniel,
      You can take a look at this version, from our forum. It has an adapted code that can handle different main unit names.
      If you cannot adapt the code to your situation, please sign-up to our forum and create a new topic, with your sample file and expected results.
      Catalin

      Reply
  31. Vibhor Godhane

    August 1, 2017 at 7:59 pm

    I am from India and I want ₹ 1,12,250.00 to convert as One Lakh Twelve Thousand Two Hundred Fifty Rupees and Zero Paise. I did by replacing Dollar with Rupees and Cents with Paise(Singular Cent=Paisa), but the problem is it display One Hundred Twelve Thousand Two Hundred Fifty Rupees and Zero Paise. If i write ₹ 11,12,250.00, it should display Eleven Lakh Twelve Thousand Two Hundred Fifty Rupees and Zero Paise. but it shows One Lakh One Hundred Twelve Thoudand Two Hundred Fifty Rupees and Zero Paisa. How to Get this as Indian Version ?

    Reply
    • Catalin Bombea

      August 3, 2017 at 1:38 pm

      Hi Vibhor,
      You can upload a sample file with your code on our forum (sign-up and create a new topic), we will help you.
      Cheers,
      Catalin

      Reply
  32. RAYEES

    July 20, 2017 at 2:47 pm

    HI

    I WANT ONLY TO MENTION IN EXCEL AS BELOW

    1000

    ONE THOUSAND ONLY

    Reply
    • Catalin Bombea

      July 20, 2017 at 9:31 pm

      Hi Rayees,
      Try this file. You will have to edit the currency, you can leave that blank “”, looks like you don’t want to use currency names.
      Catalin

      Reply
  33. Francisca Garcia

    April 24, 2017 at 9:00 pm

    Hi,

    Thank you for sharing such a useful resource! I need the code in portuguese. I’ve managed to adapt your resource somewhat from the spanish version which is close enough but there are some specifics i need further assistance with if you don’t mind.

    1) I need to be able to output an “and” between number levels, i.e. 1 200 as “one thousand and two hundred”; 1 520 110 as one million and five hundred and twenty thousand and one hundred and ten… you get the idea…?

    2) I need to differentiate singular and plural forms of thousands, millions etc.
    i.e. one million, two millions… and so on.

    L.E.:
    oh and in the case of millions, I need to add a “of” before the currency: e.g. ” five millions of currency” or “one billion of currency”.

    thank you in advance for the help.

    Regards,
    FG

    Reply
    • Catalin Bombea

      April 26, 2017 at 4:07 pm

      Hi Francisca,
      I made a few changes to the code, here it is: Num To Words – Francisca
      You have to adjust again the unit and subunit names.
      If you need more help on this, please upload your code on our forum (create a new topic), it will be easier to help you.
      Catalin

      Reply
  34. rafael

    April 1, 2017 at 12:01 pm

    I’ve been trying to write this but no success yet. $1005 as one thousand and five dollars and then
    1000040 as one million and fourty dollars.

    Reply
    • rafael

      April 1, 2017 at 12:10 pm

      I placed this code in the get hundred code but i get thousand and one Thousand and five dollars for 1005 instead of one thousand and five dollars.
      *************
      If Mid(MyNumber,2,Len(MyNumber)-2) =”00″ and Mid(MyNumber,2,len(MyNumber)-1)”0″ Then
      Result = GetDigit(Mid(MyNumber,1,1)) & “Thousand And ”
      End If

      Reply
      • Catalin Bombea

        April 1, 2017 at 11:18 pm

        Hi Rafael,
        You can try changing the GetTens and GetDigit functions:
        Edit all those emunerations like:
        Result = “Forty ” with Result = “and Forty ”
        Or:
        GetDigit = “Five” wit GetDigit = “and Five”
        But I doubt that it will work as expected, it’s not designed to work like that, for example, 1040040 will look weird…
        If you don’t want to display subunits when there are no decimals in the number, replace:
        SubUnits = ” and No ” & SubUnitName
        with:
        SubUnits = “”

        Reply
        • rafael

          April 3, 2017 at 11:27 am

          even if I try that, it still puts an and even infront of the whole number. The idea I wanna use is this, if there’s no number for a particular numbers place, you should put an “and” in it’s place. If there’s more than one “and” following each other just use one “and”. Thus 1040040 becomes One million and forty thousand thousand dollars and forty cents.

          Reply
          • rafael

            April 3, 2017 at 11:29 am

            sorry, 1040040 becomes One million and forty thousand and forty dollars

          • Catalin Bombea

            April 3, 2017 at 1:45 pm

            Hi Rafael,
            Can you please create a new topic on our forum with this problem? You can upload there your sample file with the code and a few examples of how the result should be displayed. It will be a lot easier to understand each other.
            Catalin

  35. RjMagma

    March 14, 2017 at 5:21 pm

    how to change the currency from dollar into peso (Philippine Currency)with fractions

    Reply
    • Catalin Bombea

      March 14, 2017 at 6:49 pm

      Hi,
      At the end of the article, you will find the Update 3 – Fractional Sub Units. In the first part of the article, you will find instructions for how to convert to Other Currencies, apply them to Update 3 code.
      Catalin

      Reply
  36. phalgun

    March 8, 2017 at 7:29 pm

    Hi,

    Thanks for the code. Could you help me convert it from million, billion etc to Lakh and Crore?
    ie 100,000 = 1 Lakh and 10,00,000 = 10 Lakh, 1,00,00,00,00= 1 Crore

    L.E.:
    correction:
    1,00,000 = 1 Lakh
    10,00,000 = 10 Lakhs
    1,00,00,000 = 1 Crore
    10,00,00,000 = 10 Crores
    100,00,00,000= 100 Crores

    Reply
    • Catalin Bombea

      March 9, 2017 at 12:42 am

      Hi,
      The code is for converting numbers to words, not for currency conversion, it will not display 10 Crore for example.
      Whatever numbers you send to function, they will be converted as is, so I suggest making the conversions before ending the number to the function:
      =NumToWords(450000000000/10000000) to change the base of the number. Why do you have groups of 2 and 3 zero’s in those numbers? They don’t look right.
      Catalin

      Reply
  37. jIE.ORAYT

    January 31, 2017 at 5:23 pm

    how can i do like this in my subunit?
    i want to look like this

    312.23 = THREE HUNDRED TWELVE & 23/100 CENTS ONLY
    10.01 = TEN & 1/100 CENT ONLY

    THANK YOU FOR YOUR ANSWER 😀

    Reply
    • Catalin Bombea

      February 3, 2017 at 2:22 pm

      Hi,
      Please check the Update 3 – Fractional Sub Units, which is at the end of the article, it is exactly what you need.
      Catalin

      Reply
  38. Dhiren Bhankharia

    January 30, 2017 at 9:55 pm

    Excellent code among so many I have searched om net. But still I have problems as in India we use currency as “Thousand”, “Lacs” and “Crore”.

    Reply
    • Catalin Bombea

      January 31, 2017 at 5:18 am

      Hi Dhiren,
      Can you upload a sample file with correct conversions? Use our forum to create a new topic and upload the file.
      Catalin

      Reply
  39. Ahmed Zaki

    January 21, 2017 at 4:40 am

    It is an excellent formation for which I highly appreciate the effort you have spent for making it.
    What about the Kuwaiti Dinar which has three digits for fraction?

    123.123 which is written as One Hundred Twenty Three Kuwait Dinars and One Hundred Twenty Three Fils

    Reply
    • Catalin Bombea

      January 23, 2017 at 12:06 am

      Hi Ahmed,
      This is what needs to be in code, in order to have 3 decimal places:
      If DecimalPlace > 0 Then

      SubUnits = GetHundreds(Left(Mid(MyNumber, DecimalPlace + 1) & "000", 3))
      MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))

      End If
      I replaced GetTens with GetHundreds for subunits.
      At the beginning of the code, there is a place where you can type your currency unit name and subunits name, as described in the article.
      Catalin

      Reply
  40. rogelyn palada

    January 8, 2017 at 10:54 pm

    need the 100 excel tips.thanks

    Reply
    • Catalin Bombea

      January 9, 2017 at 1:37 am

      Hi,
      Here is a link: sign-up-for-100-excel-tips-and-tricks
      Cheers,
      Catalin

      Reply
  41. Staback

    January 5, 2017 at 2:04 pm

    Could the code be displayed in such a way to display cheque style writing?

    For example ,
    5312.12 = five thousand three hundred and twelve and cents twelve only
    300.12 = three hundred and cents twelve only
    312.12 = three hundred and twelve and cents twelve only
    300 = three hundred only
    90 = ninety only

    Reply
    • Catalin Bombea

      January 6, 2017 at 4:32 am

      Hi Staback,
      Have you tried this version: convert-numbers-currency-to-words-with-excel-vba#comment-36979?
      Seems to be very close to what you need, with small changes, it may work as you want.

      Reply
  42. SunnyKow

    August 2, 2016 at 12:07 pm

    I prefer not to allow my users to touch the codes to adjust the currency as most are not familiar with VBA. My suggested workaround for them is to use the SUBSTITUTE function to replace the default currency shown. In my case replace RINGGIT with USD and SEN with CENTS and so on.

    Reply
    • Philip Treacy

      August 4, 2016 at 2:49 pm

      Hi Sunny,

      Good point. I guess the UDF could be written to take the currency and units as parameters too, thus avoiding the need to change the code to specify those.

      Cheers

      Phil

      Reply
  43. Ahmed Zaki

    May 15, 2016 at 11:22 pm

    What about the currencies that have 3 decimals such as Kuwait Dinars? How can we adjust the function to work with such currencies?

    Reply
    • Catalin Bombea

      May 17, 2016 at 3:02 pm

      Hi Ahmed,
      You have to locate this line in the code:
      SubUnits = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & "00", 2))
      Replace it with this line:
      SubUnits = GetHundreds(Left(Mid(MyNumber, DecimalPlace + 1) & "000", 3))
      This will work for currencies with up to 3 decimals.
      For translating the entire code, you have some examples above, it should be fairly easy to follow the instructions.
      Let us know if you managed to make it work.
      Cheers,
      Catalin

      Reply
      • ANILDAS

        September 19, 2019 at 4:13 am

        THANKS

        Reply
  44. Tony Chaar

    April 26, 2016 at 10:27 pm

    HI,

    Can you help giving us the way on how to round up or down the cents. Example: my cell is set to rounding 124.76 will show 125 but the code is giving (One Hundred Twenty Four US Dollars and Seventy Six Cents.

    Any chance to have like: One Hundred Twenty Five US Dollars?

    Thank you
    Tony

    Reply
    • Catalin Bombea

      April 27, 2016 at 2:20 am

      Hi Tony,
      Instead of using the function like:
      =NumToWords(124.76)
      You can pass to the function a number already rounded:
      =NumToWords(Round(124.76,0))
      The round function will pass 125 to the NumToWords function, instead of 124.76, the function will convert as you wanted.
      Instead of ROUND, you can use ROUNDUP, or ROUNDDOWN, CEILING, FLOOR, or any similar function that will round the number as desired.
      Cheers,
      Catalin

      Reply
  45. Chantal

    March 30, 2016 at 9:16 pm

    Hi.

    I thought i would help my husband with his excel sheet. He needs the difference from the time someone walks in to the time they leave. So i changed the format of his times from 08h00 and 08h45 to 08:00 and 08:45. I then added the formula eg: =G2-B2 and i got 00:45. i thought this was awesome as i was so easy. He now says he wants it to read 45 minutes. I am stumped, how do i do that?

    Reply
    • Catalin Bombea

      March 30, 2016 at 11:27 pm

      Hi Chantal,
      Format the cell containing the formula as number, not a Time format, and change the formula to:
      =(G2-B2)*24*60 to convert to decimal system.
      Cheers,
      Catalin

      Reply
  46. Gerardine

    November 12, 2015 at 1:19 am

    Hello, I would like to enquire if I want the end result to read as:-

    For example – 33,016.68 (USD THIRTY THREE THOUSAND SIXTEEN AND CENTS SIXTY-EIGHT ONLY)

    May I know how to modify / create the vba code in excel to get as above?

    I’m trying to simplify my work and minimize mistakes in the office.

    Any help you could provide is greatly appreciated, thank you!

    Gerardine

    Reply
    • Catalin Bombea

      November 13, 2015 at 12:50 am

      Hi Gerardine,
      Have you tried the file at the end of the post? NumToWords.w.Fractions.xlsm
      You will only have to add USD in front of the result string, which should be easy, let me hnow if you managed to make the change.
      Cheers,
      Catalin

      Reply
      • Gerardine

        November 14, 2015 at 1:31 am

        Hi Catalin,

        Thanks for your kind reply.

        Just took a re-look at my excel file and found that I will need the end result to read as below:-

        For example. 10,256.88 (TEN THOUSAND TWO HUNDRED FIFTY SIX AND CENTS EIGHTY-EIGHT ONLY).

        – End result needs to show all the English wordings in capital form.
        – ‘Dollars’ need not appear.
        – ‘Cents’ need to appear before the wording.
        – ‘Only’ appear at the end.

        I would really appreciate if you could help me in writing the vba code for this as I am really bad at this aspect of Excel.

        Many thanks!
        Gerardine

        Reply
        • Catalin Bombea

          November 15, 2015 at 11:59 pm

          Hi Gerardine,
          Please test this file from our OneDrive folder.
          It should work as you described.
          Cheers,
          Catalin

          Reply
  47. Kevin

    July 21, 2015 at 2:20 am

    Catalin,

    That’s perfect. All working!

    Thank you very much for your help!

    Kevin

    Reply
    • Catalin Bombea

      July 21, 2015 at 7:14 pm

      You’re wellcome Kevin 🙂
      Cheers,
      Catalin

      Reply
  48. Kevin

    July 13, 2015 at 8:55 pm

    Hi there, great work!

    I would like to amend this slightly though, have tried but not managed successfully. I want it to read in UK English, for example: £666,521.10 would be “Six hundred AND sixty six thousand five hundred and twenty one pounds ten pence”.

    I tried adding AND after the hundreds unit but it does not work in all cases!

    Any help appreciated!

    Thanks

    Kevin

    Reply
    • Catalin Bombea

      July 15, 2015 at 1:46 am

      Hi Kevin,
      You have to make the change in the Function GetHundreds(ByVal MyNumber)
      Look for this Original Line:
      Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred "
      Modify it to:
      Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred And "
      To remove the And displayed before decimals, as you example shows, look at the end of the main function (NumToWords), you will see these lines:
      Case ""
      SubUnits = " and No " & SubUnitName

      Case "One"
      SubUnits = " and One " & SubUnitSingularName

      Case Else
      SubUnits = " and " & SubUnits & " " & SubUnitName

      Simply remove ” and” from these strings.
      Here is what i have after making those changes:
      Six Hundred And Sixty Six Thousand Five Hundred And Twenty One Pounds Ten Pence

      Let me know if you succeeded 🙂
      Cheers,
      Catalin

      Reply
      • Kevin

        July 18, 2015 at 1:52 am

        Catalin,

        Many thanks for your help! Nearly there! It worked really well however if you enter 100 you get:
        “One Hundred and Pounds No Pence”
        Any thoughts?

        Thank you Kevin

        Reply
        • Catalin Bombea

          July 18, 2015 at 4:30 am

          Hi Kevin,
          GetHundreds function is still the key of the problem:
          Replace this part in your GetHundreds function:
          ' Convert the hundreds place.
          If Mid(MyNumber, 1, 1) <> "0" And (Mid(MyNumber, 2, 1) <> "0" Or Mid(MyNumber, 3, 1) <> "0") Then
          Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred And "
          Else
          Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred "
          End If

          Cheers,
          Catalin

          Reply
          • Kevin

            July 20, 2015 at 6:41 pm

            Catalin,

            THat’s great thank you!

            Works perfectly for one hundred. I did a little testing but it still falls over when entering 1,000! It says ‘Hundred One Thousand Pounds No Pence’

            Again any help appreciated!

            Thanks

            Kevin

          • Catalin Bombea

            July 20, 2015 at 8:18 pm

            Hi Kevin,
            Try this then:
            If Mid(MyNumber, 1, 1) <> "0" And (Mid(MyNumber, 2, 1) <> "0" Or Mid(MyNumber, 3, 1) <> "0") Then
            Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred And "
            ElseIf Mid(MyNumber, 1, 1) <> "0" Then
            Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred "
            End If

            Catalin

  49. ELINOR

    July 8, 2015 at 6:14 pm

    Hi Ms. Mynda!

    Is it possible to have two currency units here, because i have to convert from Saudi Riyal to US dollars for the reason of needing to prepare Bank transfer transactions?
    Thank you.

    Reply
    • Philip Treacy

      July 8, 2015 at 7:36 pm

      Hi Elinor,

      This macro is for converting a number to words so wouldn’t do what you want. To do what you want is possible but would require us to write a custom macro. If you are interested in this please open a Helpdesk ticket and we can discuss it further.

      Regards

      Phil

      Reply
  50. Ani

    June 16, 2015 at 1:37 am

    Two words! GREAT JOB.
    But how to use for 3 digit decimal currencies

    Reply
    • Philip Treacy

      June 23, 2015 at 9:36 am

      Hi Ani,

      Thank you. I’ll have to look at this and see what we can do for 3 digit decimals.

      Phil

      Reply
  51. ottoy

    January 28, 2015 at 5:05 pm

    how to convert words to numbers/currency

    tnx

    Reply
    • Catalin Bombea

      January 28, 2015 at 8:36 pm

      Hi, you can find more informations on this subject on this tutorial: convert-numbers-currency-to-words-with-excel-vba
      Catalin

      Reply
  52. Umair

    December 6, 2014 at 8:50 pm

    Hi nice efforts by programmer

    I want result in this form “Dollars One Hundred Fifty Eight Thousand Seven Hundred & Forty Six only” how’s it possible? Waiting for your prompt response

    Thanks

    Reply
    • Catalin Bombea

      December 12, 2014 at 1:54 pm

      Hi Umair,
      look in the NumToWords function, at the end you will see this line:
      NumToWords = Application.Trim(Units & SubUnits)
      You can change to:
      NumToWords = “Dollars” & Application.Trim(Units & ” & ” & SubUnits) & ” Only”
      Or to any combination that suits you, if you don’t want subunits to show, just remove that part.
      Cheers,
      Catalin

      Reply
  53. chastine

    October 8, 2014 at 3:47 pm

    Hi!

    Was wondering if you could help me out. I was looking for a function that will convert the decimals into a x/100 format. For example: 1,500.50 will become “One Thousand Five Hundred Dollars and 50/100 only”.

    I tried working around the code above but I kind of got lost.

    Thank you.

    Reply
    • Mynda Treacy

      October 9, 2014 at 12:05 pm

      Hi Chastine,

      You can use a number format for that. Simply select the cells you want formatted then press CTRL+1 to open the Format Cells dialog box > then go to the Number tab > Choose Fraction from the cateogry list > choose ‘As hundredths’ from the Type list.

      Kind regards,

      Mynda

      Reply
      • chastine

        October 9, 2014 at 1:24 pm

        Hi Mynda!

        Thank you so much for your reply. Can I combine that with the NumToWords Function? Sorry, am trying to help make our cheque preparation faster but I’m not too familiar with creating functions.

        Thank you again!
        Chastine

        Reply
        • Philip Treacy

          October 10, 2014 at 11:18 am

          Hi Chastine,

          no you can’t combine the two.

          I’ve modified my code though so it does what you want,you can download the workbook from here.

          Regards

          Phil

          Reply
  54. Roshan

    September 10, 2014 at 8:02 pm

    How to do it on Excel 2007 all work books

    Reply
    • Philip Treacy

      September 11, 2014 at 10:04 am

      Hi Roshan,

      Just download the 2007 workbook and then insert the code into your workbook. You then use the code like any other function.

      For example if you wanted to convert a number in A1 to words, then in A2 you would enter =NumToWords(A1)

      Regards

      Phil

      Reply
      • Najeeb hamayun

        October 19, 2017 at 6:38 pm

        what about the currencies with three decimals e.g Omani Riyal?

        Reply
        • Catalin Bombea

          October 23, 2017 at 1:49 am

          Hi Najeeb,
          Here is a description of what needs to be changed to have 3 decimal places: https://www.myonlinetraininghub.com/convert-numbers-currency-to-words-with-excel-vba#comment-44776
          Catalin

          Reply
  55. herecomesbrod

    June 28, 2014 at 2:52 am

    Had to write a check printing program for our office in Dom Rep – pleased with myself when I found the Microsoft kb. Wrote the code, sent the file and they pointed out that they needed it in Spanish…oh yes…err. Then I found your excellent page and used Pablo’s translation. Life saver! Thank you very much.

    Reply
    • Philip Treacy

      June 29, 2014 at 9:11 am

      Fantastic! Great to hear that international collaboration is going on 🙂

      Phil

      Reply
      • edwardnguyen

        August 16, 2014 at 5:04 pm

        I having this text, it very good. But I want to take for Japansese number. Please help me. 
        Take note:from 100 to 199
        example: 100 = hyaku
        but when i input 100 then = ichihyaku is wrong.

        100 = [ hyaku ] is that right.
        please help me,
        thanks

        Option Explicit

        'Main Function
        Function JPY(ByVal MyNumber)

        'Written by Philip Treacy
        'https://www.myonlinetraininghub.com/convert-numbers-currency-to-words-with-excel-vba
        'Feb 2014
        'Based on code from Microsoft https://support.microsoft.com/kb/213360

        Dim Units As String
        Dim SubUnits As String
        Dim TempStr As String
        Dim DecimalPlace As Integer
        Dim Count As Integer
        Dim DecimalSeparator As String
        Dim UnitName As String
        Dim SubUnitName As String
        Dim SubUnitSingularName As String

        ' Change these as required **************************
        ' UnitName = "Dollar" ' NOTE : This is singular
        ' SubUnitName = "Cents" ' NOTE : This is plural
        ' SubUnitSingularName = "Cent" ' NOTE : This is singular
        ' DecimalSeparator = "."
        ' ***************************************************
        UnitName = "" ' NOTE : This is singular
        SubUnitName = "円" ' NOTE : This is plural
        SubUnitSingularName = "千" ' NOTE : This is singular
        DecimalSeparator = "."

        ReDim Place(9) As String
        Place(2) = " 千 "
        Place(3) = " 教区 "
        Place(4) = " 十億"
        Place(5) = " 百億 "

        ' Convert MyNumber to STRING and TRIM white space
        MyNumber = Trim(CStr(MyNumber))

        'If MyNumber is blank then exit
        If MyNumber = "" Then

        JPY = ""

        Exit Function

        End If

        ' Find Position of decimal place, 0 if none.
        DecimalPlace = InStr(MyNumber, DecimalSeparator)

        ' Convert SubUnits and set MyNumber to Units amount.
        If DecimalPlace > 0 Then

        SubUnits = GetTens(left(Mid(MyNumber, DecimalPlace + 1) & "00", 2))
        MyNumber = Trim(left(MyNumber, DecimalPlace - 1))

        End If

        Count = 1
        Do While MyNumber ""

        TempStr = GetHundreds(Right(MyNumber, 3))

        If TempStr "" Then Units = TempStr & Place(Count) & Units

        If Len(MyNumber) > 3 Then

        MyNumber = left(MyNumber, Len(MyNumber) - 3)

        Else

        MyNumber = ""

        End If

        Count = Count + 1

        Loop

        Select Case Units

        Case ""
        Units = "" & UnitName & ""

        Case ""
        Units = "" & UnitName

        Case Else
        Units = Units & " " & UnitName & ""

        End Select

        Select Case SubUnits

        Case ""
        SubUnits = "" & SubUnitName

        Case ""
        SubUnits = "" & SubUnitSingularName

        Case Else
        SubUnits = "" & SubUnits & " " & SubUnitName

        End Select

        JPY = Application.Trim(Units & SubUnits)

        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)) & "百"
        '
        ' ElseIf Mid(MyNumber, 1, 1) = "100 to 199" Then
        '
        ' Result = GetDigit(Mid(MyNumber, 1, 2)) & "百"
        '
        ' Else

        If Mid(MyNumber, 1, 3) = "100 to 199" Then

        Result = GetDigit(Mid(MyNumber, 1, 0)) & "百"

        ElseIf Mid(MyNumber, 1, 3) "0" Then

        Result = GetDigit(Mid(MyNumber, 1, 1)) & "百"

        Else

        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 = "十"
        Case 11: Result = "十一"
        Case 12: Result = "十二"
        Case 13: Result = "十三"
        Case 14: Result = "十四"
        Case 15: Result = "十五"
        Case 16: Result = "十六"
        Case 17: Result = "十七"
        Case 18: Result = "十八"
        Case 19: Result = "十九"
        Case Else

        End Select

        Else ' If value between 20-99...

        Select Case Val(left(TensText, 1))

        Case 2: Result = "二十"
        Case 3: Result = "三十 "
        Case 4: Result = "四十 "
        Case 5: Result = "五十"
        Case 6: Result = "六十 "
        Case 7: Result = "七十 "
        Case 8: Result = "八十 "
        Case 9: Result = "九十"
        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 = "一"
        Case 2: GetDigit = "二"
        Case 3: GetDigit = "三"
        Case 4: GetDigit = "四"
        Case 5: GetDigit = "互"
        Case 6: GetDigit = "六"
        Case 7: GetDigit = "七"
        Case 8: GetDigit = "八"
        Case 9: GetDigit = "九"
        Case Else: GetDigit = ""

        End Select

        End Function

        Reply
        • Catalin Bombea

          August 16, 2014 at 6:03 pm

          Hi Edward,
          Please upload a sample file to our Help Desk with your code and with a few examples of how a specific number should look when it’s properly converted to text.
          We’ll do our best to help you 🙂
          Catalin

          Reply
          • edwardnguyen

            August 20, 2014 at 6:20 pm

            thank you Catalin Bombea

          • Catalin Bombea

            August 21, 2014 at 3:28 am

            You’re wellcome 🙂

  56. Anne Smith

    February 11, 2014 at 12:22 am

    Hello. Wonder if you can help. I get your newsletter delivered to my business e-mail. Whenever I try to print it (even when size reduction is selected) it will not fit on a standard printed 8×11 page (left and right columns severely cut off). Any suggestions?

    My thanks, Anne Smith

    Reply
    • Mynda Treacy

      February 11, 2014 at 10:24 am

      Hi Anne,

      Sorry you’re having trouble printing our newsletters. What I recommend is that you view the newsletter on the web by clicking the link at the top of the email.

      Copy the URL for the page, in this case it’s https://www.myonlinetraininghub.com/convert-numbers-currency-to-words-with-excel-vba

      Then go to PrintFriendly.com and paste the link in the field (it’ll be obvious where to paste it) to get a print preview. PrintFriendly allows you to remove components you don’t want before you print to your printer or PDF or email.

      Kind regards,

      Mynda.

      Reply
  57. Grainne Duggan

    February 8, 2014 at 7:26 am

    Mynda
    As a variation of this, how would you take a long number such as $1,256,954.84 and convert to words $1.26 Million. Also the same function for Thousands etc. Rather than have it convert the whole number, round it in the text only?
    Gráinne

    Reply
    • Mynda Treacy

      February 8, 2014 at 9:11 am

      Hi Grainne,

      You can do that with a custom number format:

      $0.00,, “Million”

      No need for VBA 🙂

      Kind regards,

      Mynda.

      Reply
  58. Bryan Metz

    February 7, 2014 at 9:42 pm

    Looks good. I will usually make parameters that might change but are almost always the same into optional arguments with default values. So in your case instead of having the embedded UnitName, SubUnitName, etc, I would declare the function like so:

    Function NumToWords(ByVal MyNumber As Variant, Optional UnitName As String = "Dollar", Optional SubUnitName As String = "Cents", _
    Optional SubUnitSingularName As String = "Cent", Optional DecimalSeparator As String = ".") As String

    This way if you are using the defaults you’d call it the same way, but if you wanted to change it only then would you have to add the other parameters. If you regularly use multiple currencies, you could set up multiple functions that call NumToWords with default parameters. So PoundsToWords(MyNumber) would simply call NumToWords(MyNumber, "Pounds", "Pence", "Penny", "."), and so on.

    Then this also opens you up to more options: maybe code it so that if SubUnitSingularName is blank, then it will use SubUnitName for both, or if DecimalSeparator is blank, then it will use Application.International(xlDecimalSeparator) instead, and so on.

    Or maybe I just usually go a little overboard coding for situations that will never arise…

    Reply
    • Philip Treacy

      February 9, 2014 at 8:06 pm

      Excellent Bryan. Yes these are all great suggestions and if I get time next week I’ll try to adapt the code.

      I don’t think you are going overboard, I like the approach of making the code as generic as possible so it can fit as many situations as possible – and hence be more useful.

      Thanks

      Phil

      Reply

Leave a Reply Cancel reply

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

Current ye@r *

Leave this field empty

Sidebar

More results...

Featured Content

  • 10 Common Excel Mistakes to Avoid
  • Top Excel Functions for Data Analysts
  • Secrets to Building Excel Dashboards in Less Than 15 Minutes
  • Pro Excel Formula Writing Tips
  • Hidden Excel Double-Click Shortcuts
  • Top 10 Intermediate Excel Functions
  • 5 Pro Excel Dashboard Design Tips
  • 5 Excel SUM Function Tricks
  • 239 Excel Keyboard Shortcuts

100 Excel Tips and Tricks eBook

Download Free Tips & Tricks

Subscribe to Our Newsletter

Receive weekly tutorials on Excel, Power Query, Power Pivot, Power BI and More.

We respect your email privacy

Guides and Resources

  • Excel Keyboard Shortcuts
  • Excel Functions
  • Excel Formulas
  • Excel Custom Number Formatting
  • ALT Codes
  • Pivot Tables
  • VLOOKUP
  • VBA
  • Excel Userforms
  • Free Downloads

239 Excel Keyboard Shortcuts

Download Free PDF

Free Webinars

Excel Dashboards Webinar

Watch our free webinars and learn to create Interactive Dashboard Reports in Excel or Power BI

Click Here to Watch Now

mynda treacy microsoft mvpHi, I'm Mynda Treacy and I run MOTH with my husband, Phil. Through our blog, webinars, YouTube channel and courses we hope we can help you learn Excel, Power Pivot and DAX, Power Query, Power BI, and Excel Dashboards.

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk – For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.