the value of Text?

  • Thread starter Thread starter Kestrel1492
  • Start date Start date
K

Kestrel1492

I Hope I'm just overlooking a stock standard way to do this, but:

I'd like to find a fairly simple way to convert text in a cell to a
numerical value, that I can then use as a checksum.
I don't mean cells containing the word"one" would equal 1, but rather
something like ("o"=15)+("n"=14)+("e"=5)=34
I want to use it to help uniquely identify rows, so it has to be
simple, or it will take too long to execute and be counter productive.

Thanks,
Kestrel
 
Sorry,
For clarification, each cell may contain as much as a full paragraph of
text. An example of a cell would be:

WHEN IN RAIN ALL RADIOS ARE UNREADABLE EXITING RAIN XMISSIONS TO THE
A/C ARE READABLE

Sorry, I should have said these are aircraft log entries, and sometimes
long winded.

Thanks,
Kestel
 
If you put some single characters in column A and this in column B:

=code(a1)
(and drag down)

You'll see that each character has a numeric representation.

A = 65
a = 97
.. = 46

Maybe you could use those codes to get your checksum.

=SUMPRODUCT(CODE((MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))))

or maybe better:

=IF(A1="","",SUMPRODUCT(CODE((MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)))))

Note that these will evaluate the same:

ABCD
DBCA
ACBD
(and so forth)

But maybe it's close enough???

============
Are you worried about having duplicates in your data?

If yes, you may want to read Chip Pearson's treatise on Duplicates:
http://www.cpearson.com/excel/duplicat.htm
 
Ah, nice.

I knew there had to be some kind of value function, Thanks Dave
 

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

Back
Top