ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Get character code within string (https://www.excelbanter.com/excel-programming/450723-get-character-code-within-string.html)

Robert Crandal[_3_]

Get character code within string
 
What are some ways to determine the character code
of an individual character within a string? Will I need
to use the Chr() function?




Claus Busch

Get character code within string
 
Hi Robert,

Am Sat, 21 Mar 2015 12:45:07 -0700 schrieb Robert Crandal:

What are some ways to determine the character code
of an individual character within a string? Will I need
to use the Chr() function?


try Asc:
For example the code of the first character of myStr:
myChr = Asc(Left(myStr, 1))
And declare myChr as integer or long


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional


All times are GMT +1. The time now is 09:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com