Skip to main content
Email Password   helpLost your password?

Introduction

In computing world the convention used for grouping of digits are based on internationl standards which generally follows American practice. It means that digits are grouped in groups of two digits each i.e. thousands, millions, billions etc. However, people in India are habitual for groups of three, two, two... This groups forms the thousands, lakhs, crore etc. To solve this problem a function has already been posted on code project by me for converting any number to the groupings of thousands, lakhs, crores etc. in continuation of this the function here convert any number to the number in words with digit gropuping of thousands, lakhs, crores etc.

BACKGROUND

This function in in Visual Basic and is based on the knowledge base article of Microsoft. The original article convert the number to the international digit grouping i.e. thousands, millions, billions etc.

USING THE CODE

As the function is written in Visual Basic the same may be used in nay application using visual basic as scripting launguage. For using the code in Excel, Word, Access simply copy and paste full code in the visual basic module and use the fuction.

HOW IT WORKS

The function is named as NumberToWords. This accepts a parameter of type variant. First the fuction checks the exsitance of decimal in the number passed as parameter. If decimal exsits it construct the word for paisa. After removing the decimal digits from the number it converts digits, tens and hundreds by using routine ConvertDigits, ConvertTens and ConvertHundreds respectively. It contrct and returns a string containing the number in words with rupees and pasia as prefix and suffix.

You must Sign In to use this message board.
 
 
Per page   
 FirstPrevNext
GeneralBugs corrected in the function [modified] Pin
Vidyadhar B.C.
23:05 14 Oct '07  
GeneralConvert Currency To Words Solved all problems Pin
Nair Sreekumar
0:25 31 Jul '07  
GeneralBug in the code and a workaround Pin
kunmun23
8:53 14 Jul '07  
GeneralRe: Bug in the code and a workaround [modified] Pin
Vidyadhar B.C.
18:55 14 Oct '07  
Questionhow do i use? Pin
6:15 8 Mar '07  
GeneralPls specify the function or the formula to be used in MS Excel/Access [modified] Pin
Suresh Kardar
20:13 8 Oct '06  
GeneralDigit to word conversion program-reg Pin
S.PRAKASH
21:17 7 Jul '06  
GeneralSolved my Problem Pin
tmistry
22:22 23 May '06  
GeneralThousand Digit Not define Properly Pin
John dsoza
2:57 28 Apr '06  
GeneralUnable to use the function in access 2003 Pin
Dnyanraj
0:51 17 Jan '06  
GeneralWant to use the same for other application Pin
gotspatel
4:08 1 Feb '05  
GeneralProblem in Conversion Pin
Krishna Kumar Menon
2:55 30 Aug '04  
GeneralGreat, but... Pin
Snyp
16:45 17 Feb '04  
GeneralRe: Great, but... Pin
P.K.Agarwal
17:06 19 Feb '04  
GeneralRe: Great, but... Pin
P.K.Agarwal
17:10 19 Feb '04  


Last Updated 16 Feb 2004 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2009