13,254,154 members (61,402 online)
alternative version

#### Stats

149.4K views
32 bookmarked
Posted 19 Feb 2008

# Convert Number to Word

, 19 Feb 2008
 Rate this:
Convert any decimal number to word using vb.net

## Introduction

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.

## Background

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
Next
Return retWord
End Function
```

## Share

 Software Developer (Senior) India
Pranav Patel
B.Sc, MCSD

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...

 First PrevNext
 Perfect solution ravikumar336-Jul-17 22:30 ravikumar33 6-Jul-17 22:30
 Need modification Member 406098020-Mar-17 6:29 Member 4060980 20-Mar-17 6:29
 Thank you... veera kumar20-Aug-16 0:44 veera kumar 20-Aug-16 0:44
 erro in conversion Member 1249044828-Apr-16 0:43 Member 12490448 28-Apr-16 0:43
 Worked Member 1112113630-Sep-14 8:16 Member 11121136 30-Sep-14 8:16
 THANKS A LOT Member 1111700928-Sep-14 23:32 Member 11117009 28-Sep-14 23:32
 number conversion Member 1102112918-Aug-14 22:05 Member 11021129 18-Aug-14 22:05
 number conversion using vb.net Member 1102112918-Aug-14 21:53 Member 11021129 18-Aug-14 21:53
 THANKS A LOT DEAR..... satishgurav18-Jul-14 19:21 satishgurav 18-Jul-14 19:21
 My vote of 3 Ashoka Pathirana21-May-14 19:38 Ashoka Pathirana 21-May-14 19:38
 thanks Ram A Singh14-Aug-13 7:50 Ram A Singh 14-Aug-13 7:50
 It never converts zeros JAYANTHIMURUGESAN26-Mar-13 15:33 JAYANTHIMURUGESAN 26-Mar-13 15:33
 Thanks taenel l pasaylo27-Jan-13 2:27 taenel l pasaylo 27-Jan-13 2:27
 Not perfect alifaris5-Nov-12 9:36 alifaris 5-Nov-12 9:36
 project rahul binaikia29-May-12 5:58 rahul binaikia 29-May-12 5:58
 Thanks !!! Member 340016411-May-12 16:17 Member 3400164 11-May-12 16:17
 My vote of 5 Jack_32123-Apr-12 0:38 Jack_321 23-Apr-12 0:38
 Thanks Member 850926513-Mar-12 20:09 Member 8509265 13-Mar-12 20:09
 My vote of 4 Md. Marufuzzaman2-Jan-12 20:22 Md. Marufuzzaman 2-Jan-12 20:22
 My vote of 5 Аslam Iqbal26-Dec-11 21:43 Аslam Iqbal 26-Dec-11 21:43
 Nice Work maruf2111-Dec-11 13:17 maruf21 11-Dec-11 13:17
 My vote of 1 Member 846869111-Dec-11 5:16 Member 8468691 11-Dec-11 5:16
 My vote of 1 divyanivas18-Aug-11 10:10 divyanivas 18-Aug-11 10:10
 How do increase to more than 999999999.99 Deepesh Krishnan29-Apr-11 20:50 Deepesh Krishnan 29-Apr-11 20:50
 My vote of 5 CodeDog13-Apr-11 5:58 CodeDog 13-Apr-11 5:58
 Last Visit: 31-Dec-99 19:00     Last Update: 21-Nov-17 14:05 Refresh 12 Next »