Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
JCP
 
Posts: n/a
Default Number to words literal

Hi

I need a funtion to convert Number to words literally, I mean 1241 (One Two
four one)

I found many examples for currency but I need literal every number to word.

Thanks in advance.
  #2   Report Post  
mangesh_yadav
 
Posts: n/a
Default


http://tinyurl.com/8n4fz

by Bob Phillips


Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=378884

  #3   Report Post  
JMB
 
Posts: n/a
Default

just wondering - can you use use excel's text to columns feature to split
your numbers into individual cells, use the currency examples you found to
convert each number to text, then concatenate the resulting strings back
together?

or, once you split the number, use a macro w/a case statement to convert the
numbers to words - as long as there would only be 10 cases (0-9), then
concatenate the strings back together?


"JCP" wrote:

Hi

I need a funtion to convert Number to words literally, I mean 1241 (One Two
four one)

I found many examples for currency but I need literal every number to word.

Thanks in advance.

  #4   Report Post  
JCP
 
Posts: n/a
Default

Hi

Thanks but is not literal, I need for example if the number is 7648 I need
Six four eight. The common is Six hundred... I dont' need that just every
number as is.

Thanks.

"mangesh_yadav" wrote:


http://tinyurl.com/8n4fz

by Bob Phillips


Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=378884


  #5   Report Post  
JMB
 
Posts: n/a
Default

change the argument data type if you need to.

Function Words(Arg As Long) As String
For i = 1 To Len(CStr(Arg))
Select Case CInt(Mid(Arg, i, 1))
Case 1: Words = Words & "One "
Case 2: Words = Words & "Two "
Case 3: Words = Words & "Three "
Case 4: Words = Words & "Four "
Case 5: Words = Words & "Five "
Case 6: Words = Words & "Six "
Case 7: Words = Words & "Seven "
Case 8: Words = Words & "Eight "
Case 9: Words = Words & "Nine "
Case 0: Words = Words & "Zero "
End Select
Next i

Words = Trim(Words)

End Function



"JCP" wrote:

Hi

I need a funtion to convert Number to words literally, I mean 1241 (One Two
four one)

I found many examples for currency but I need literal every number to word.

Thanks in advance.



  #6   Report Post  
Mangesh Yadav
 
Posts: n/a
Default

Added a routine to Bob's ..

' Converts a number from 1 to 9 into text.
Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "One"
Case 2: GetDigit = "Two"
Case 3: GetDigit = "Three"
Case 4: GetDigit = "Four"
Case 5: GetDigit = "Five"
Case 6: GetDigit = "Six"
Case 7: GetDigit = "Seven"
Case 8: GetDigit = "Eight"
Case 9: GetDigit = "Nine"
Case Else: GetDigit = ""
End Select
End Function

Function NumWord(x)

For i = 1 To Len(x)

If i < 2 Then
NumWord = GetDigit(Mid(x, i, 1))
Else
NumWord = NumWord & " " & GetDigit(Mid(x, i, 1))
End If
Next i

End Function

Use the above two functions. The first one (GetDigit) is by Bob Phillips.

A1 = 123
usage:
=numword(A1)


Mangesh




"JCP" wrote in message
...
Hi

Thanks but is not literal, I need for example if the number is 7648 I need
Six four eight. The common is Six hundred... I dont' need that just every
number as is.

Thanks.

"mangesh_yadav" wrote:


http://tinyurl.com/8n4fz

by Bob Phillips


Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile:

http://www.excelforum.com/member.php...o&userid=10470
View this thread:

http://www.excelforum.com/showthread...hreadid=378884




  #7   Report Post  
JCP
 
Posts: n/a
Default

Mangesh

Sorry for not answer you, this exactly what I need. I really appreciate your
time.

God bless.

"Mangesh Yadav" wrote:

Added a routine to Bob's ..

' Converts a number from 1 to 9 into text.
Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "One"
Case 2: GetDigit = "Two"
Case 3: GetDigit = "Three"
Case 4: GetDigit = "Four"
Case 5: GetDigit = "Five"
Case 6: GetDigit = "Six"
Case 7: GetDigit = "Seven"
Case 8: GetDigit = "Eight"
Case 9: GetDigit = "Nine"
Case Else: GetDigit = ""
End Select
End Function

Function NumWord(x)

For i = 1 To Len(x)

If i < 2 Then
NumWord = GetDigit(Mid(x, i, 1))
Else
NumWord = NumWord & " " & GetDigit(Mid(x, i, 1))
End If
Next i

End Function

Use the above two functions. The first one (GetDigit) is by Bob Phillips.

A1 = 123
usage:
=numword(A1)


Mangesh




"JCP" wrote in message
...
Hi

Thanks but is not literal, I need for example if the number is 7648 I need
Six four eight. The common is Six hundred... I dont' need that just every
number as is.

Thanks.

"mangesh_yadav" wrote:


http://tinyurl.com/8n4fz

by Bob Phillips


Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile:

http://www.excelforum.com/member.php...o&userid=10470
View this thread:

http://www.excelforum.com/showthread...hreadid=378884





  #8   Report Post  
JCP
 
Posts: n/a
Default

JMB

Even I use the code of Mangesh, I appreciate your time and valuable advise,
Thanks.

"JMB" wrote:

change the argument data type if you need to.

Function Words(Arg As Long) As String
For i = 1 To Len(CStr(Arg))
Select Case CInt(Mid(Arg, i, 1))
Case 1: Words = Words & "One "
Case 2: Words = Words & "Two "
Case 3: Words = Words & "Three "
Case 4: Words = Words & "Four "
Case 5: Words = Words & "Five "
Case 6: Words = Words & "Six "
Case 7: Words = Words & "Seven "
Case 8: Words = Words & "Eight "
Case 9: Words = Words & "Nine "
Case 0: Words = Words & "Zero "
End Select
Next i

Words = Trim(Words)

End Function



"JCP" wrote:

Hi

I need a funtion to convert Number to words literally, I mean 1241 (One Two
four one)

I found many examples for currency but I need literal every number to word.

Thanks in advance.

  #9   Report Post  
Mangesh Yadav
 
Posts: n/a
Default

Hi JCP,

no problem. Thanks for the feedback.

Mangesh



"JCP" wrote in message
...
Mangesh

Sorry for not answer you, this exactly what I need. I really appreciate

your
time.

God bless.

"Mangesh Yadav" wrote:

Added a routine to Bob's ..

' Converts a number from 1 to 9 into text.
Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "One"
Case 2: GetDigit = "Two"
Case 3: GetDigit = "Three"
Case 4: GetDigit = "Four"
Case 5: GetDigit = "Five"
Case 6: GetDigit = "Six"
Case 7: GetDigit = "Seven"
Case 8: GetDigit = "Eight"
Case 9: GetDigit = "Nine"
Case Else: GetDigit = ""
End Select
End Function

Function NumWord(x)

For i = 1 To Len(x)

If i < 2 Then
NumWord = GetDigit(Mid(x, i, 1))
Else
NumWord = NumWord & " " & GetDigit(Mid(x, i, 1))
End If
Next i

End Function

Use the above two functions. The first one (GetDigit) is by Bob

Phillips.

A1 = 123
usage:
=numword(A1)


Mangesh




"JCP" wrote in message
...
Hi

Thanks but is not literal, I need for example if the number is 7648 I

need
Six four eight. The common is Six hundred... I dont' need that just

every
number as is.

Thanks.

"mangesh_yadav" wrote:


http://tinyurl.com/8n4fz

by Bob Phillips


Mangesh


--
mangesh_yadav

------------------------------------------------------------------------
mangesh_yadav's Profile:

http://www.excelforum.com/member.php...o&userid=10470
View this thread:

http://www.excelforum.com/showthread...hreadid=378884







  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Number to words literal



"JCP" wrote:

Hi

I need a funtion to convert Number to words literally, I mean 1241 (One Two
four one)

I found many examples for currency but I need literal every number to word.

Thanks in advance.



  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 50
Default Number to words literal



"JCP" wrote:

Hi

I need a funtion to convert Number to words literally, I mean 1241 (One Two
four one)

I found many examples for currency but I need literal every number to word.

Thanks in advance.

  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 50
Default Number to words literal



"JCP" wrote:

Hi

I need a funtion to convert Number to words literally, I mean 1241 (One Two
four one)

I found many examples for currency but I need literal every number to word.

Thanks in advance.



Vijay Chary,
India
26-11-2006

Hi JCP !,
You could write a Function or a Macro In VBA That will
Compose in words (literal) any given number in words as you have shown in
your posting.

Prepare a worksheet in the workbook with a word for each digit in one column.
(e.g.) one, two, three etc. in column A. The Macro (or Function) chooses
the contents of the nth cell in column A. Then the Words are concatenated to
give you
(e.g.) One Two Four One if you Input 1241.

You are Welcome !
  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Number to words literal

hi mangesh, i'm not a professional user of excel, but am facing the same
problem... however i dont know where to paste this funtion that you wrote,
can you please guide me through, step by step. would really appreciate your
help.
thanks.
reply on my e-mail

"Mangesh Yadav" wrote:

Added a routine to Bob's ..

' Converts a number from 1 to 9 into text.
Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "One"
Case 2: GetDigit = "Two"
Case 3: GetDigit = "Three"
Case 4: GetDigit = "Four"
Case 5: GetDigit = "Five"
Case 6: GetDigit = "Six"
Case 7: GetDigit = "Seven"
Case 8: GetDigit = "Eight"
Case 9: GetDigit = "Nine"
Case Else: GetDigit = ""
End Select
End Function

Function NumWord(x)

For i = 1 To Len(x)

If i < 2 Then
NumWord = GetDigit(Mid(x, i, 1))
Else
NumWord = NumWord & " " & GetDigit(Mid(x, i, 1))
End If
Next i

End Function

Use the above two functions. The first one (GetDigit) is by Bob Phillips.

A1 = 123
usage:
=numword(A1)


Mangesh




"JCP" wrote in message
...
Hi

Thanks but is not literal, I need for example if the number is 7648 I need
Six four eight. The common is Six hundred... I dont' need that just every
number as is.

Thanks.

"mangesh_yadav" wrote:


http://tinyurl.com/8n4fz

by Bob Phillips


Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile:

http://www.excelforum.com/member.php...o&userid=10470
View this thread:

http://www.excelforum.com/showthread...hreadid=378884





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Number Field to Text or Words mr_bsh Excel Discussion (Misc queries) 5 May 10th 05 03:40 PM
How do you sort words in Excel by the number of letters in a word Kinger New Users to Excel 2 May 2nd 05 11:42 PM
how do I find an average number of specific words in a column cashgrfx New Users to Excel 7 January 6th 05 04:44 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM
Count the number of words in a cell! Doom3 Excel Worksheet Functions 4 November 23rd 04 06:00 AM


All times are GMT +1. The time now is 12:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"