# Microsoft Office Application Help - Excel Help forum > Excel Formulas & Functions >  >  Convert ASCII Character strings into HEX Strings

## Chris Mathers

In an Excel worksheet, I would like to enter a persons Name, complete with Initial Caps and Spaces into cell A2 and have it converted into a HEX string in B2.

The formula would be replicated down the page so that lists of names and their HEX equivalents could be created.

The purpose of this is for inputting the HEX Strings into the Speed-Dial library in a Phone System.

Any help will be greatly appreciated.  I have hundreds of names to input!

Example:      A                                             B
2         Chris Mathers        4368726973204D617468657273

Sincerely,  Chris Mathers

----------


## protonLeah

Here's a small user function:



```
Please Login or Register  to view this content.
```


copy the code, then 
In XL, select Tools -> Macros -> VB Editor
in the project explorer pane, right click the vbproject withe the name of your workbook, select Insert...module
paste into the new module and close the VB Editor.

In cell B2, or where ever you want the hexcodes, type
_=asc2hex(A2)_, then copy down the column.

----------


## Chris Mathers

:Smilie:   :Smilie:   :Smilie:  

Dear Ben...

What a fan you have 'Down Under'!

Your code worked a treat, thank you!  This is the first time I have used a forum so you can imagine my pleasure. All sorted in under 24 hours. Thanks, again.

Chris Mathers  :Smilie:   :Smilie:   :Smilie:

----------


## protonLeah

You're welcome.

----------


## questorfla

I am totally unfamiliar with Excel in any form.  I assume your instructions were for Excel 2003.  Is there a similar function in Excel 2007 and/or Excel 2010?

If so could you please tell me how to find it?

I could use the same function you gave here although what I really need is a bit more complex and may not even be possible.  It involves converting the data (alpha) in cell A to its 
"CRC32 HASH" value which would appear in Cell B and the "ADLER32 HASH" value which would appear in Cell C.  

Currently I am having to use 2 programs to do this along with cut and paste which is very tedious and prone to human error   <mine   :Smilie:   >.  I could probably come up with a way to use the hexadecimal conversion your provided but the ideal solution would be the hash values as that is what we have been using.

Thanks for any help

----------


## squiggler47

You should start a new thread with the question you want answering, but in the meantime 

http://www.excelforum.com/excel-prog...ml#post2406840

Might help!

----------

