Amount to Words macro

Here is a new year gift for the Indian customers. Converting Amount to Words is always a problem. Many application require it and that code is always written manually, within the application. What is really needed is a comprehensive Excel function. Many people have written lots of Excel functions. But neither of them is specific to India, nor is it comprehensive.

We (Raj and me) had created it in 2005, but I had forgotten to publish it on the blog. We have done good amount of testing – but still you have to use it at your own risk. No guarantees. Read on to download, install and use the Excel function.

Amount to Words banner

Amount to Words installation instructions

This macro will work on Excel 2010 onwards.

  1. Download the Amount to Words macro file XLSM as a ZIP format from here.
  2. Unzip it in a new directory (folder).
  3. You will see a file called Amount2Words2017 V8.xlsm
  4. Double click to open the file.
  5. You may see the Enable Macros dialog. Choose Enable.
  6. DO NOT use the file as it is.  It will NOT work.
  7. You must save it as an add-in first.
  8. Choose File – Save As and choose the type XLAMAmount to Words - save as add-in
  9. The path will automatically change to the appropriate Add-in folder.
  10. DO NOT change the path.
  11. Once the file is saved, close the XLSM file. You don’t need it any longer.
  12. Now go to File – Options dialog.
  13. Choose Add-ins option.Amount to Words - Add-in dialog
  14. At the bottom you will see the Excel Add-ins dropdown.
  15. Choose the Go.. button.
  16. Now you will see a list of Excel Add-ins.
  17. Select or activate the checkbox showing Amount to Words Function 

    Amount to Words - Activate Add-in

  18. Click OK
  19. The add-in is installed.
  20. Just to be on the safer side, close and re-open Excel
  21. Now the Amount to Words functionality is available across all Excel files in your login (profile)

Why did I not provide the XLAM file directly?
Because, many users make a mistake while storing the add-in in the right place.
The method shown above ensures that it is saved in the right place.

Developers can use the VBA code

While the XLSM file is open, you can press Alt-F11 to view the code and reuse it if you like. Please give a link to my blog as attribution. Thanks.

How to use Amount to Words Add-in

  1. Open any Excel file where you want to convert Amount to Words.
  2. Click on any empty cell.
  3. Notice that you now have a new tab in ribbon called Efficiency 365.
  4. Open that tab.
  5. The function is called AmountToWords.
  6. The function accepts 16 parameters.
  7. It is difficult to type all the parameters correctly.
  8. Therefore, we have provided you with a very friendly user interface (dialog)
  9. Click on the Generate Function button.Amount to Words - Generate syntax button
  10. Type a sample number and choose the exact parameters you want.
  11. When you get exactly what you want, click on the Insert into current cell button.
  12. Remember that whatever is currently there in that cell will be OVERWRITTEN. UNDO may not work.
  13. Now press F2 to copy that syntax and paste it wherever you want it.
  14. Change the sample number to the cell reference where the actual number is.
  15. If you type this in a Table, the formula will be auto-copied.
  16. You can now reuse the formula anywhere you want.
  17. Anytime you want to change the output, choose Generate Function button again and create new syntax.

 Create the Amount to Words function syntax interactively

Here is the dialog you see when you click on the Generate Function button in the Efficiency 365 tab. Make sure that the current cell is empty before invoking the dialog. It does not pick up the value from the current cell. If the current cell is already populated, it will overwrite that value or formula. Be careful.

Amount to Words - Syntax generation dialog

  1. The dialog is just a sample syntax generator.
  2. It does not pickup values from the current cell.
  3. Type a sample value in the Amount textbox.
  4. Now change the parameters exactly as per your specific needs.
  5. When you change any parameter, the resulting function will be shown, along with the actual output.Amount to Words - Syntax creation dialog usage
  6. Once you get exactly the output you want, choose the Insert into current cell button. This button is inactive till you type some value in the Amount textbox.
  7. Close the dialog.
  8. Now press F2 to edit the sample function.
  9. Copy the syntax and paste it where you have the actual numbers which you want to convert to words.Amount to Words - Sample syntax
  10. Change the first parameter to the cell which has the actual numbers.
  11. Now you will get your number converted as per the desired output syntaxAmount to Words - Syntax with target cell

    Amount to Words - target output

  12. If needed copy that formula to cover more cells. If you copy pasted the formula in a Table, the new formula will be auto-copiedAmount to Words - used in a Table
  13. Practice it a couple of times and you are good to go!

Amount to Words function syntax

The Amount to Words function accepts 16 different parameters. Why so many parameters? Because we wanted to provide all possible flexibility in the conversion process. Those who need this function will be able to appreciate the thought and the comprehensive set of parameters we have provided. If you need more, let us know (post a comment here) and we will work on your wish-list.

Here is a detailed description of what each parameter does. You can directly create a function by understanding the parameters. Initially however, you should use the Generate Function button in the Efficiency 365 tab to create function syntax interactively.

No Parameters Value Amount Formula Result
1 The value which is to be converted to text (Mandatory parameter) Cell Reference 1435.56 =AmountToWords(E8) Rupees one thousand, four hundred and thirty five and fifty six paisa only
2 Whether to put commas in places 0 or 1 1435.56 =AmountToWords(E9,FALSE) Rupees one thousand four hundred and thirty five and fifty six paisa only
3 Should the word “Only” be added at the end of the output 0 or 1 1435.56 =AmountToWords(E10,,FALSE) Rupees one thousand, four hundred and thirty five and fifty six paisa
4 Specify the word Rupees or not 0 or 1 1435.56 =AmountToWords(E11,,,FALSE) One thousand, four hundred and thirty five and fifty six paisa only
5 Whether to show the paisa component 0 or 1 1435.56 =AmountToWords(E12,,,,FALSE) Rupees one thousand, four hundred and thirty five only
6 Whether to put the word “and” 0 or 1 1435.56 =AmountToWords(E13,,,,,0) Rupees one thousand, four hundred thirty five and fifty six paisa only
7 If true, the word for Rupees will come AFTER the description of the rupee amount 0 or 1 1435.56 =AmountToWords(E14,,,,,,1) One thousand, four hundred and thirty five rupees and fifty six paisa only
8 If true, the word for Paisa will come AFTER the description of the Paisa amount 0 or 1 1435.56 =AmountToWords(E15,,,,,,,1) Rupees one thousand, four hundred and thirty five and fifty six paisa only
9 U pper “U” 1435.56 =AmountToWords(E16,,,,,,,,”U”) RUPEES ONE THOUSAND, FOUR HUNDRED AND THIRTY FIVE AND FIFTY SIX PAISA ONLY
10 L ower “L” 1435.56 =AmountToWords(E17,,,,,,,,”L”) rupees one thousand, four hundred and thirty five and fifty six paisa only
11 T itle– and should always be lower case “T” 1435.56 =AmountToWords(E18,,,,,,,,”T”) Rupees One Thousand, Four Hundred and Thirty Five and Fifty Six Paisa Only
12 S entence – default “S” 1435.56 =AmountToWords(E19,,,,,,,,”S”) Rupees one thousand, four hundred and thirty five and fifty six paisa only
13 What to specify in the “Rupee” position (Position 1) “Rs” 1435.56 =AmountToWords(E20,,,,,,,,,”Rs”) Rs one thousand, four hundred and thirty five and fifty six paisa only
14 What to specify in position 18, in case ShowPaisa is True “P” 1435.56 =AmountToWords(E21,,,,,,,,,,”P”) Rupees one thousand, four hundred and thirty five and fifty six p only
15 What to call Lacs? “Lakhs” 123456.56 =AmountToWords(E22,,,,,,,,,,,”Lakhs”) Rupees one lakhs, twenty three thousand, four hundred and fifty six and fifty six paisa only
16 What to output if ShowPaisa is TRUE but paisa value is zero? “No” 1435 =AmountToWords(E23,,,,,,,,,,,,”No”) Rupees one thousand, four hundred and thirty five and no paisa only

Practical usage of Amount to Words Macro

This function is designed for Indian accounting system only.
This functionality is typically required for for cheque printing.
However, any scenario where Amount to Words conversion is required, this function is useful.

JavaScript version for developers on GitHub

My friend Raj wrote the code.
He also took the trouble to publish the JavaScript version of the core conversion function and publish it on GitHub.  Developers can now download it and use it in any environment which supports JavaScript.

Share the Amount to Words function

If you like the function, please share it with your colleagues and friends. They will surely thank you for solving a long-standing problem.

Feedback or wish-list

Your feedback is most welcome. Please post it as a comment here.
We are not perfect. If we have missed some functionality, do let us know.

Article end marker image

Comments? Suggestions? Wish list?