Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 698
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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
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
Convert numbers stored as text to numbers Stig - tame racing driver Excel Discussion (Misc queries) 5 November 14th 08 10:10 AM
Convert numbers stored as text to numbers Excel 2000 Darlene Excel Discussion (Misc queries) 6 January 31st 06 08:04 PM
How do I convert numbers stored as text with spaces to numbers Baffuor Excel Discussion (Misc queries) 1 May 24th 05 07:39 AM
How to convert Excel imported numbers from text to numbers? Alden Excel Discussion (Misc queries) 9 April 1st 05 09:51 PM


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

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

About Us

"It's about Microsoft Excel"