Click here to Skip to main content
13,591,914 members
Click here to Skip to main content
Add your own
alternative version


32 bookmarked
Posted 19 Feb 2008
Licenced CPOL

Convert Number to Word

, 19 Feb 2008
Rate this:
Please Sign up or sign in to vote.
Convert any decimal number to word using


I have created this function for converting amount in Indian Rupees (INR). You can manipulate as you wish like decimal setting, Doller (any currency) Prefix.


I have coded this function as per client's requirement to print word format of Billed Amount.

Using the code

This two dimensional array store the primary word convertion of number.

 Function retWord(ByVal Num As Decimal) As String
    'This two dimensional array store the primary word convertion of number.
    retWord = ""
    Dim ArrWordList(,) As Object = {{0, ""}, {1, "One"}, {2, "Two"}, {3, "Three"}, {4, "Four"}, _
                                    {5, "Five"}, {6, "Six"}, {7, "Seven"}, {8, "Eight"}, {9, "Nine"}, _
                                    {10, "Ten"}, {11, "Eleven"}, {12, "Twelve"}, {13, "Thirteen"}, {14, "Fourteen"}, _
                                    {15, "Fifteen"}, {16, "Sixteen"}, {17, "Seventeen"}, {18, "Eighteen"}, {19, "Nineteen"}, _
                                    {20, "Twenty"}, {30, "Thirty"}, {40, "Forty"}, {50, "Fifty"}, {60, "Sixty"}, _
                                    {70, "Seventy"}, {80, "Eighty"}, {90, "Ninety"}, {100, "Hundred"}, {1000, "Thousand"}, _
                                    {100000, "Lakh"}, {10000000, "Crore"}}

    Dim i As Integer
    For i = 0 To UBound(ArrWordList)
        If Num = ArrWordList(i, 0) Then
            retWord = ArrWordList(i, 1)
            Exit For
        End If
    Return retWord
End Function


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Patel Pranav
Software Developer (Senior)
India India
Pranav Patel

I am serving my company as Sr. Software Engineer. I have more than 4 years of experience in Microsoft Technologies specially VB 6, VB.Net,C#,ASP.Net and MS SQL Server

You may also be interested in...

Comments and Discussions

GeneralMy vote of 4 Pin
Md. Marufuzzaman2-Jan-12 19:22
mvpMd. Marufuzzaman2-Jan-12 19:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web04-2016 | 2.8.180618.1 | Last Updated 20 Feb 2008
Article Copyright 2008 by Patel Pranav
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid