ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Code for Unicode (https://www.excelbanter.com/excel-programming/379389-re-code-unicode.html)

NickHK

Code for Unicode
 
Gary,
My Excel help has given up at the moment, so I can't tell if there is
something built-in, but these UDFs work :

Public Function CodeUnicode(argIn As Variant) As Long
CodeUnicode = AscW(argIn)
End Function

Public Function CharUnicode(argIn As Long) As String
CharUnicode = ChrW(argIn)
End Function

NickHK

"Gary''s Student" wrote in message
...
If I have a character in a cell, say a in cell A1, then
=CODE(A1) will give me the code for this character, in this case 97.

What can give me the "code" for a unicode character? (between 1 and 65536)
--
Gary's Student




Gary''s Student

Code for Unicode
 
Thank you
--
Gary's Student


"NickHK" wrote:

Gary,
My Excel help has given up at the moment, so I can't tell if there is
something built-in, but these UDFs work :

Public Function CodeUnicode(argIn As Variant) As Long
CodeUnicode = AscW(argIn)
End Function

Public Function CharUnicode(argIn As Long) As String
CharUnicode = ChrW(argIn)
End Function

NickHK

"Gary''s Student" wrote in message
...
If I have a character in a cell, say a in cell A1, then
=CODE(A1) will give me the code for this character, in this case 97.

What can give me the "code" for a unicode character? (between 1 and 65536)
--
Gary's Student






All times are GMT +1. The time now is 02:27 PM.

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