LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Is it possible...

John,

I thibk this 'idea' is going to be a minefield of potential errors but
here's a UDF that works for you posted example.


Function NumLtr(str As String) As String
s = "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y ,z"
v = Split(s, ",")
For x = 1 To Len(str) Step 2
letter = CLng(Mid(str, x, 2))
NumLtr = NumLtr + v(CLng(Mid(str, x, 2)) - 1)
Next
End Function
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"John Smith" wrote:

To convert a text value to a number using a defined rule in Excel, say a
macro or some other formula? Take for example, say the value "Instructor"
mapping to 09141920182103201518 with each letter corresponding to its
position in the alphabet represented by a two digit number. However, the
longer the word, the longer the numerical string, so I would like to be able
to limit this in some way.

I do not yet know which words or phrases will be entered, but is there some
hash function available that will keep the numeric strings relatively short?


.

 
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



All times are GMT +1. The time now is 12:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"