need to turn a word into numbers (or ascii codes)

T

TG

how do i turn a word into ascii code? am trying to use vlookup to look up two
words (each word or value in their proper column) to find the third which is
what am trying to find. However, Vlookup appears to only work with number..
or is there an easier way (another formula) that i can use to work with
strings?
I have been trying to figure this thing out for hours and seem to get no
where.
Please explain with some detail if you have a solution.
Your help will be highly appreciated.
TG
 
R

Rick Rothstein

It would be helpful if you gave us a specific example showing what data you have (words, lists, etc.) and what you want to do with them.
 
R

ryguy7272

Try something like this:
=code(a1)
Obviously, you much change the reference to suit you needs...

Regards,
Ryan---
 
T

TG

yes but Code(a1) gives you the ascii code of the first letter, i need the
ascii code of the whole word: Like Code(text), i need the ascii code
combination of t and e and x and t, or something similar. if there are two
words that start with the same letter the code(text) is no good.
thanks
 
R

Rick Rothstein

Again I'll ask... show us an example of some text and what you expect to get for your result.
 
R

Ron Rosenfeld

how do i turn a word into ascii code? am trying to use vlookup to look up two
words (each word or value in their proper column) to find the third which is
what am trying to find. However, Vlookup appears to only work with number..
or is there an easier way (another formula) that i can use to work with
strings?
I have been trying to figure this thing out for hours and seem to get no
where.
Please explain with some detail if you have a solution.
Your help will be highly appreciated.
TG


Your premise that "Vlookup appears to only work with number" is wrong.

VLOOKUP works with text strings, as should be apparent from reading HELP for
that function.

If you would respond to Rick's question about demonstrating what you want to
do, someone will offer a solution.

--ron
 
R

ryguy7272

Sum? Maybe? Still not sure what you are doing there?
Function SumCharacters(rng As Range) As Long

Dim i As Long
Dim s As String
Dim lSum As Long
Dim myCell As Range

lSum = 0
For Each myCell In rng.Cells
For i = 1 To Len(myCell.Value)
s = Mid(myCell.Value, i, 1) 'mycell.text if it's formatted
If IsNumeric(s) Then
lSum = lSum + s
End If
Next i
Next myCell

SumCharacters = lSum
End Function


Regards,
Ryan---
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top