Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to check a character string in Excel

Status
Not open for further replies.

121854

MIS
Aug 2, 2003
60
US
Need to check a Hex value in a VBA expression. Does anyone know how to do that. For example, I have a string in a cell, ABC. When move this to a Text string I have values between A and B. Special character, how can I compare that value to hex so that I know how to parse the string.

Any ideas.
 
Hi 121854,

Not quite sure what you want here, so a few pointers:

- use the Chr function to produce any character from its ascii code - e.g. Chr(65) = "A"
- use the Asc function to get the ascii code of any character - e.g. Asc("A") = 65
- use &H to code hex literals - e.g. &H41 = 65, so Chr(&H41) = "A"

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at [url=http://www.vbaexpress.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top