# Convert Currency in Number to Words (Indian Rupees)

Cheques, invoices, bills, receipts are needs to have the currency format both in Numerical and words. The below script can be used in Microsoft Excel / Word / Access or any VBA program supported applications to convert the currency in number format to worlds (English).

`span style="color: #808080;">' Edited by Karthikeyan karthikeyan@livetolearn.in" Thousand "         Place(3) = " lakh "         Place(4) = " Crore "           ' Convert MyNumber to a string, trimming extra spaces.' Find decimal place.".")          ' If we find decimal place...' Convert Paise"00", 2)            ' Hi! Note the above line Mid function it gives right portion            ' after the decimal point            'if only . and no numbers such as 789. accures, mid returns nothing            ' to avoid error we added 00            ' Left function gives only left portion of the string with specified places here 2' Strip off paise from remainder to convert.""' Convert last 3 digits of MyNumber to Indian Rupees.""' Remove last 3 converted digits from MyNumber.""' convert last two digits to of mynumber"""0"""' Remove last 2 converted digits from MyNumber.""' Clean up rupees.""               Rupees = """One"               Rupees = "Rupee One""Rupees "' Clean up paise.""               Paise = """One"               Paise = "One Paise"" Paise"""" Only"""" Only"" and " & Paise & " Only""One""Two""Three""Four""Five""Six""Seven""Eight""Nine"""' Exit if there is nothing to convert.' Append leading zeros to number."000" & MyNumber, 3)          ' Do we have a hundreds place digit to convert?"0"" Hundred "' Do we have a tens place digit to convert?"0"' If not, then convert the ones place digit.' Is value between 10 and 19?"Ten""Eleven""Twelve""Thirteen""Fourteen""Fifteen""Sixteen""Seventeen""Eighteen""Nineteen"' .. otherwise it's between 20 and 99."Twenty ""Thirty ""Forty ""Fifty ""Sixty ""Seventy ""Eighty ""Ninety "' Convert ones place digit.`

## How to use this code?

• Click on Developer Tab in MS office (Word / Excel / Access). If Developer Tab not appears, click here to know the way to enable this.
• Click Visual Basic, then VBA application development window will open
• Now right click in Project pane, insert -> Module

• Now paste the above code and save it as Macro Enabled document. (For excel save with extension .xlsm)
• Now you can use the formula '=ConvertCurrencyToEnglish()'

### MS Access & MS Word Implementations

Update 02-03-2017 : Code updated to show 'Rupee/Rupees' as prefix and 'Only' as suffix.

Category:
Tags: