Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Conversion of Numerics into Words

  Asked By: Heena    Date: Jan 16    Category: MS Office    Views: 786
  

can any one tell me how to convert figures into words
automatically in excel
like
660 is converted six hundred sixty

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Varick Fischer     Answered On: Jan 16

I don't have an example for Excel. However, I found an example in Access
that should be fairly easy to convert  the method used into Excel. I've also
included some code that I have used in creating Word documents. Hopefully
this will provide some help if no one else has an Excel sample to share.

There is an Access example available at
http://www.mvps.org/access/modules/mdl0047.htm

And this is the code that I use to convert a date to words  in Word.

Insert a string of text at the appropriate bookmark to insert the current
day in Words. Such as On this 21st Day of December, 2002

Sub DayInWords()
'Sub AutoNew()

Dim myDate As Date
Dim varDay As Variant
Dim varMonth As String
Dim varYear As Variant
Dim varSuffix As String
Dim dateAns As String

On Error GoTo EH
myDate = Date

varDay = DatePart("d", myDate)
varMonth = DatePart("m", myDate)
varYear = DatePart("yyyy", myDate)

Select Case varDay
Case 1, 21, 31
varSuffix = "st"
Case 2, 22
varSuffix = "nd"
Case 3, 23
varSuffix = "rd"
Case 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, _
18, 19, 20, 24, 25, 26, 27, 28, 29, 30
varSuffix = "th"
Case Else
MsgBox "Unknown Day"
End Select

Select Case varMonth
Case Is = 1
varMonth = "January"
Case Is = 2
varMonth = "February"
Case Is = 3
varMonth = "March"
Case Is = 4
varMonth = "April"
Case Is = 5
varMonth = "May"
Case Is = 6
varMonth = "June"
Case Is = 7
varMonth = "July"
Case Is = 8
varMonth = "August"
Case Is = 9
varMonth = "September"
Case Is = 10
varMonth = "October"
Case Is = 11
varMonth = "November"
Case Is = 12
varMonth = "December"
Case Else
MsgBox "Month is invalid"
End Select

varDay = varDay & varSuffix
dateAns = varDay & " day of " & varMonth & ", " & varYear
Debug.Print dateAns
'Insert the Date in the appropriate bookmark
Selection.GoTo What:=wdGoToBookmark, Name:="DayInWords"
Selection.InsertBefore dateAns

'Handle Errors Gracefully
Exit_EH:
Exit Sub
EH:
MsgBox Err.Number & ": " & Err.Description
Resume Exit_EH

End Sub

 
Answer #2    Answered By: Haboos Kauser     Answered On: Jan 16
 
Answer #3    Answered By: Bama Cohen     Answered On: Jan 16

I think this might be what your looking for:

http://www.ozgrid.com/VBA/ValueToWords.htm

 
Didn't find what you were looking for? Find more on Conversion of Numerics into Words Or get search suggestion and latest updates.




Tagged: