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


Is there any way to convert a charatcer into its decimal value in excel
VBA?

E.g. to compare "A" to the number 65 which is its decimal equivalent?

Thank you!


--
lithium81
------------------------------------------------------------------------
lithium81's Profile: http://www.excelforum.com/member.php...o&userid=29461
View this thread: http://www.excelforum.com/showthread...hreadid=520458

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default character to integer conversion

Hi Lithium81,

MsgBox Asc("A")

---
Regards,
Norman



"lithium81" wrote in
message ...

Is there any way to convert a charatcer into its decimal value in excel
VBA?

E.g. to compare "A" to the number 65 which is its decimal equivalent?

Thank you!


--
lithium81
------------------------------------------------------------------------
lithium81's Profile:
http://www.excelforum.com/member.php...o&userid=29461
View this thread: http://www.excelforum.com/showthread...hreadid=520458



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default character to integer conversion

A1="A"
in B1 put =Code(A1)

or =Code("A")

"lithium81" wrote:


Is there any way to convert a charatcer into its decimal value in excel
VBA?

E.g. to compare "A" to the number 65 which is its decimal equivalent?

Thank you!


--
lithium81
------------------------------------------------------------------------
lithium81's Profile: http://www.excelforum.com/member.php...o&userid=29461
View this thread: http://www.excelforum.com/showthread...hreadid=520458


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default character to integer conversion

lithium81,
If on a worksheet, check the CODE and CHAR functions in Excel Help
If in VBA, then it's ASC and CHR in VBA help.

NickHK

"lithium81" wrote in
message ...

Is there any way to convert a charatcer into its decimal value in excel
VBA?

E.g. to compare "A" to the number 65 which is its decimal equivalent?

Thank you!


--
lithium81
------------------------------------------------------------------------
lithium81's Profile:

http://www.excelforum.com/member.php...o&userid=29461
View this thread: http://www.excelforum.com/showthread...hreadid=520458



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default character to integer conversion


Thanks folks! That helps a lot!!


--
lithium81
------------------------------------------------------------------------
lithium81's Profile: http://www.excelforum.com/member.php...o&userid=29461
View this thread: http://www.excelforum.com/showthread...hreadid=520458

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
Excel 2007 - Formatting text in cell (character by character) TomC Excel Discussion (Misc queries) 0 January 29th 10 07:25 PM
How do I add an integer to an existing integer? Aaron Excel Worksheet Functions 3 December 17th 09 09:46 PM
Excel-Match 1st text character in a string to a known character? bushlite Excel Worksheet Functions 2 January 15th 07 06:36 PM
Stopping conversion to an elipse character Q1 Excel Discussion (Misc queries) 1 July 14th 06 10:12 PM
importing undelimited text file data, character-by-character The Mos$ Excel Programming 4 December 26th 05 11:01 AM


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