Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert Numbers to Text
Hi, I use the code available from the Microsoft Web site that converts
numbers to text and it works very well however, I have had requests to add the word "and" in between the thousands and hundreds : example Instead of "One Thousand Two Hundred Fifty Nine Dollars and Ten Cents" as it now shows I Need "One Thousand Two Hundred and Fifty Nine Dollars and Ten Cents With my limited knowledge I realise that you have to add the word "and" to somewhere in the existing code, just not sure where ?? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert Numbers to Text
i'm not sure what you're using, but look for the word "Hundred" and change
it to "Hundred and " -- Gary Keramidas Excel 2003 "will07" wrote in message ... Hi, I use the code available from the Microsoft Web site that converts numbers to text and it works very well however, I have had requests to add the word "and" in between the thousands and hundreds : example Instead of "One Thousand Two Hundred Fifty Nine Dollars and Ten Cents" as it now shows I Need "One Thousand Two Hundred and Fifty Nine Dollars and Ten Cents With my limited knowledge I realise that you have to add the word "and" to somewhere in the existing code, just not sure where ?? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert Numbers to Text
Would you like to post the link to the specific code you are using.
-- Regards, OssieMac "will07" wrote: Hi, I use the code available from the Microsoft Web site that converts numbers to text and it works very well however, I have had requests to add the word "and" in between the thousands and hundreds : example Instead of "One Thousand Two Hundred Fifty Nine Dollars and Ten Cents" as it now shows I Need "One Thousand Two Hundred and Fifty Nine Dollars and Ten Cents With my limited knowledge I realise that you have to add the word "and" to somewhere in the existing code, just not sure where ?? Thanks |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert Numbers to Text
This is the link to the page that shows the code
http://support.microsoft.com/default.aspx/kb/213360 Thanks for all your help "OssieMac" wrote: Would you like to post the link to the specific code you are using. -- Regards, OssieMac "will07" wrote: Hi, I use the code available from the Microsoft Web site that converts numbers to text and it works very well however, I have had requests to add the word "and" in between the thousands and hundreds : example Instead of "One Thousand Two Hundred Fifty Nine Dollars and Ten Cents" as it now shows I Need "One Thousand Two Hundred and Fifty Nine Dollars and Ten Cents With my limited knowledge I realise that you have to add the word "and" to somewhere in the existing code, just not sure where ?? Thanks |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert Numbers to Text
Checks are normally written without the 'and'.
"Gary Keramidas" wrote: i'm not sure what you're using, but look for the word "Hundred" and change it to "Hundred and " -- Gary Keramidas Excel 2003 "will07" wrote in message ... Hi, I use the code available from the Microsoft Web site that converts numbers to text and it works very well however, I have had requests to add the word "and" in between the thousands and hundreds : example Instead of "One Thousand Two Hundred Fifty Nine Dollars and Ten Cents" as it now shows I Need "One Thousand Two Hundred and Fifty Nine Dollars and Ten Cents With my limited knowledge I realise that you have to add the word "and" to somewhere in the existing code, just not sure where ?? Thanks . |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert Numbers to Text
Thanks for the reply, you are right, most documents do not require the and,
because this is being used for tender letters, managment require the word "and" Thanks for the help. "TexPop" wrote: Checks are normally written without the 'and'. "Gary Keramidas" wrote: i'm not sure what you're using, but look for the word "Hundred" and change it to "Hundred and " -- Gary Keramidas Excel 2003 "will07" wrote in message ... Hi, I use the code available from the Microsoft Web site that converts numbers to text and it works very well however, I have had requests to add the word "and" in between the thousands and hundreds : example Instead of "One Thousand Two Hundred Fifty Nine Dollars and Ten Cents" as it now shows I Need "One Thousand Two Hundred and Fifty Nine Dollars and Ten Cents With my limited knowledge I realise that you have to add the word "and" to somewhere in the existing code, just not sure where ?? Thanks . |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert Numbers to Text
did you try adding the word and where i suggested?
-- Gary Keramidas Excel 2003 "will07" wrote in message ... Thanks for the reply, you are right, most documents do not require the and, because this is being used for tender letters, managment require the word "and" Thanks for the help. "TexPop" wrote: Checks are normally written without the 'and'. "Gary Keramidas" wrote: i'm not sure what you're using, but look for the word "Hundred" and change it to "Hundred and " -- Gary Keramidas Excel 2003 "will07" wrote in message ... Hi, I use the code available from the Microsoft Web site that converts numbers to text and it works very well however, I have had requests to add the word "and" in between the thousands and hundreds : example Instead of "One Thousand Two Hundred Fifty Nine Dollars and Ten Cents" as it now shows I Need "One Thousand Two Hundred and Fifty Nine Dollars and Ten Cents With my limited knowledge I realise that you have to add the word "and" to somewhere in the existing code, just not sure where ?? Thanks . |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert Numbers to Text
Hi Gary, Thanks for the reply, I have not tried as yet as there is no
obvious place where the word Hundred appears. If you look at the website attached you will see it only appears once. I do not want to start adding words and have the code break down, any suggestions ??? http://support.microsoft.com/default.aspx/kb/213360 Thanks "Gary Keramidas" wrote: did you try adding the word and where i suggested? -- Gary Keramidas Excel 2003 "will07" wrote in message ... Thanks for the reply, you are right, most documents do not require the and, because this is being used for tender letters, managment require the word "and" Thanks for the help. "TexPop" wrote: Checks are normally written without the 'and'. "Gary Keramidas" wrote: i'm not sure what you're using, but look for the word "Hundred" and change it to "Hundred and " -- Gary Keramidas Excel 2003 "will07" wrote in message ... Hi, I use the code available from the Microsoft Web site that converts numbers to text and it works very well however, I have had requests to add the word "and" in between the thousands and hundreds : example Instead of "One Thousand Two Hundred Fifty Nine Dollars and Ten Cents" as it now shows I Need "One Thousand Two Hundred and Fifty Nine Dollars and Ten Cents With my limited knowledge I realise that you have to add the word "and" to somewhere in the existing code, just not sure where ?? Thanks . . |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert Numbers to Text
Maybe here is where you need to enter "AND".
Untested. ' Converts a number from 100-999 into text Function GetHundreds(ByVal MyNumber) Dim Result As String If Val(MyNumber) = 0 Then Exit Function MyNumber = Right("000" & MyNumber, 3) ' Convert the hundreds place. If Mid(MyNumber, 1, 1) < "0" Then Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred " End If If Mid(MyNumber, 1, 1) < "0" Then Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred and " End If HTH Regards, Howard "will07" wrote in message ... Hi, I use the code available from the Microsoft Web site that converts numbers to text and it works very well however, I have had requests to add the word "and" in between the thousands and hundreds : example Instead of "One Thousand Two Hundred Fifty Nine Dollars and Ten Cents" as it now shows I Need "One Thousand Two Hundred and Fifty Nine Dollars and Ten Cents With my limited knowledge I realise that you have to add the word "and" to somewhere in the existing code, just not sure where ?? Thanks |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert Numbers to Text
this should work
Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred " to this Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred and " -- Gary Keramidas Excel 2003 "will07" wrote in message ... Hi Gary, Thanks for the reply, I have not tried as yet as there is no obvious place where the word Hundred appears. If you look at the website attached you will see it only appears once. I do not want to start adding words and have the code break down, any suggestions ??? http://support.microsoft.com/default.aspx/kb/213360 Thanks "Gary Keramidas" wrote: did you try adding the word and where i suggested? -- Gary Keramidas Excel 2003 "will07" wrote in message ... Thanks for the reply, you are right, most documents do not require the and, because this is being used for tender letters, managment require the word "and" Thanks for the help. "TexPop" wrote: Checks are normally written without the 'and'. "Gary Keramidas" wrote: i'm not sure what you're using, but look for the word "Hundred" and change it to "Hundred and " -- Gary Keramidas Excel 2003 "will07" wrote in message ... Hi, I use the code available from the Microsoft Web site that converts numbers to text and it works very well however, I have had requests to add the word "and" in between the thousands and hundreds : example Instead of "One Thousand Two Hundred Fifty Nine Dollars and Ten Cents" as it now shows I Need "One Thousand Two Hundred and Fifty Nine Dollars and Ten Cents With my limited knowledge I realise that you have to add the word "and" to somewhere in the existing code, just not sure where ?? Thanks . . |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert Numbers to Text
Hi Gary, Changed the code as you said, it worked 1st time, I am so grateful
for your time and help to get me over this hurdle. Thanks again Will "Gary Keramidas" wrote: this should work Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred " to this Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred and " -- Gary Keramidas Excel 2003 "will07" wrote in message ... Hi Gary, Thanks for the reply, I have not tried as yet as there is no obvious place where the word Hundred appears. If you look at the website attached you will see it only appears once. I do not want to start adding words and have the code break down, any suggestions ??? http://support.microsoft.com/default.aspx/kb/213360 Thanks "Gary Keramidas" wrote: did you try adding the word and where i suggested? -- Gary Keramidas Excel 2003 "will07" wrote in message ... Thanks for the reply, you are right, most documents do not require the and, because this is being used for tender letters, managment require the word "and" Thanks for the help. "TexPop" wrote: Checks are normally written without the 'and'. "Gary Keramidas" wrote: i'm not sure what you're using, but look for the word "Hundred" and change it to "Hundred and " -- Gary Keramidas Excel 2003 "will07" wrote in message ... Hi, I use the code available from the Microsoft Web site that converts numbers to text and it works very well however, I have had requests to add the word "and" in between the thousands and hundreds : example Instead of "One Thousand Two Hundred Fifty Nine Dollars and Ten Cents" as it now shows I Need "One Thousand Two Hundred and Fifty Nine Dollars and Ten Cents With my limited knowledge I realise that you have to add the word "and" to somewhere in the existing code, just not sure where ?? Thanks . . . |
#12
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert Numbers to Text
Hi, I changed the code as you suggested and it worked 1st time. Thank you
for your advice, it got me over a great hurdle. Thanks Again "L. Howard Kittle" wrote: Maybe here is where you need to enter "AND". Untested. ' Converts a number from 100-999 into text Function GetHundreds(ByVal MyNumber) Dim Result As String If Val(MyNumber) = 0 Then Exit Function MyNumber = Right("000" & MyNumber, 3) ' Convert the hundreds place. If Mid(MyNumber, 1, 1) < "0" Then Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred " End If If Mid(MyNumber, 1, 1) < "0" Then Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred and " End If HTH Regards, Howard "will07" wrote in message ... Hi, I use the code available from the Microsoft Web site that converts numbers to text and it works very well however, I have had requests to add the word "and" in between the thousands and hundreds : example Instead of "One Thousand Two Hundred Fifty Nine Dollars and Ten Cents" as it now shows I Need "One Thousand Two Hundred and Fifty Nine Dollars and Ten Cents With my limited knowledge I realise that you have to add the word "and" to somewhere in the existing code, just not sure where ?? Thanks . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Convert numbers stored as text to numbers | Excel Discussion (Misc queries) | |||
Convert numbers stored as text to numbers Excel 2000 | Excel Discussion (Misc queries) | |||
How do I convert numbers stored as text with spaces to numbers | Excel Discussion (Misc queries) | |||
How to convert Excel imported numbers from text to numbers? | Excel Discussion (Misc queries) |