View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default extract and assign numerics to characters

On Sun, 16 Nov 2008 05:14:51 -0800 (PST), Totti
wrote:

Hi everyone,
I have a sheet that contains some products code but with no special
pattern,like the following:

DIJ
HEBGI
IGICD
BH
EFHJI
DHDFI

i want to assign these values, numbers from 0-9 as they are from from
A - J in a different column, i searched the newsgroups for help, i
understood that it would be something involving ROW(INDIRECT("1:"&LEN
(A2)) to be able to do what i am suppose to do in one cell so that DIJ
for instance takes the value of 389 so on so forth.
i tried with my limited knowledge to apply it, i was able to get the
first character only like D - 3 could you please help me on this task?
that i know what i am doing wrong or more generally how should this
task be approached, thanks a lot in advance


=SUMPRODUCT(CODE(MID(A2,ROW(INDIRECT("1:"&LEN(A2)) ),1))-65,
10^(LEN(A2)-ROW(INDIRECT("1:"&LEN(A2)))))

--ron