Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default ASCII Conversion

Anyone know an easy way to convert a Decimal Number to
ascii. As an example 12592 decimal = 10 ascii. Please
reply asap.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default ASCII Conversion

In what sense is 12592 decimal = 10 ascii? Are you saying the decimal number
12,592 is equivalent to the ASCII string "10"?


"Keith" wrote in message
...
Anyone know an easy way to convert a Decimal Number to
ascii. As an example 12592 decimal = 10 ascii. Please
reply asap.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default ASCII Conversion


Bob, Thanks for the reply. What I have is a decimal number 12592 and it
is being converted to an ascii string "10",and vice versa. I need a
quick way to check the data transmission and conversions of these
numbers. I set up dde link to capture the data from a remote computer ,
but the data is converted to decimal numbers as soon as it hit the
interface. I know what the ascii string should be but I would like to
captire it real time.

thx
Keith

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default ASCII Conversion

Are you saying that you know the rule that governs the conversion, but you
just want to do the comparison faster?

"Keith Baxley" wrote in message
...

Bob, Thanks for the reply. What I have is a decimal number 12592 and it
is being converted to an ascii string "10",and vice versa. I need a
quick way to check the data transmission and conversions of these
numbers. I set up dde link to capture the data from a remote computer ,
but the data is converted to decimal numbers as soon as it hit the
interface. I know what the ascii string should be but I would like to
captire it real time.

thx
Keith

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default ASCII Conversion


Bob, I do not know the rule that governs the conversion ! That is what I
need.


thx


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default ASCII Conversion

Sorry, I don't know the rule either. It could be a DDE standard of some
kind, but I am not familiar with DDE enough to know. The only other
suggestion I can offer is to send something you know and see how it is
converted and either infer the rule or make up a conversion table, if
feasable.

"Keith Baxley" wrote in message
...

Bob, I do not know the rule that governs the conversion ! That is what I
need.


thx


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default ASCII Conversion

Keith

The numbers one to 9 use the codes 49 to 57 do you want to
add the code up?

The following will print the ascii code for each number in
the columns to the right. So in your example you will need
5 blank columns to the right of the number.

Sub Test2()
Dim c, a
Dim l As Integer, s As Integer
For Each c In Selection
l = Len(c)
For s = 1 To l
a = Asc(Mid(c, s, 1))
c.Offset(0, s) = a
Next s

Next c
End Sub

Regards
Peter
-----Original Message-----
Anyone know an easy way to convert a Decimal Number to
ascii. As an example 12592 decimal = 10 ascii. Please
reply asap.
.

  #8   Report Post  
Posted to microsoft.public.excel.programming
jaf jaf is offline
external usenet poster
 
Posts: 300
Default ASCII Conversion

Hi Keith,
If your data is being transmitted as ASCII (aka: ascii text) then you would
receive 6 characters.
49 50 53 57 50 10 or 13. 10 is the linefeed char. 13 is the carrage return
char.

If the data is being transmitted in binary then you would receive the
hexadecimal equilivents.
31 32 35 39 10 A or D
Or a hex value of 3130. It depends on the bits per byte. 8 bit, 16 bit 32
bit....

In any case you are receiving a string or series of byte values. It's either
an ASCII byte or HEX byte.

No idea why or how your seeing 10.

There are worksheet functions hextodec(), dectohex(), dectobin() if your
running the analysis toolpak add-in.

Get specific. What programs and what protocols are you using?
Lan? Internet?

Using code? Post it.


--
John
johnf 202 at hotmail dot com


"Keith" wrote in message
...
| Anyone know an easy way to convert a Decimal Number to
| ascii. As an example 12592 decimal = 10 ascii. Please
| reply asap.


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
CSV to ASCII Quco Excel Discussion (Misc queries) 5 April 4th 23 10:30 AM
ascii conversion [email protected] Excel Discussion (Misc queries) 4 September 17th 06 09:38 PM
ASCII to Numeric Conversion cincode5 Excel Discussion (Misc queries) 2 August 4th 05 07:25 PM
Ascii Syrus the Virus[_11_] Excel Programming 4 February 3rd 04 02:59 PM
ASCII value Terence Excel Programming 2 October 2nd 03 03:41 AM


All times are GMT +1. The time now is 07:12 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"