a tough question - calculating a number out of an alphanumeric code

U

usingexcel

Hi, I have been trying to figure this one out, but I have not been able
to.

I have an alphanumeric code - say BC983X8 - in a cell, and I need to
calculate an extra digit based on it. Each letter has a value (place
in alphabet+9). How can I do this?
 
T

tim m

So the value you would generate from your alpha code would be = 84 correct?
(B=11, C=12, X=33)? Are your codes always of the same length? Are the
letters always capitals?

You can get the proper number for each letter by using the formula
=CODE(A1)-55
this is assuming only one capital letter is in A1. I can't think of an easy
way to do this without a very complex formula or a macro or seperating all
digits and letters out using text to columns and then doing some
calculations.
 
L

ledzepe

usingexcel said:
Hi, I have been trying to figure this one out, but I have not been able
to.

I have an alphanumeric code - say BC983X8 - in a cell, and I need to
calculate an extra digit based on it. Each letter has a value (place
in alphabet+9). How can I do this?

There are other scripting tools that operates on the character of the
text like KixScript, etc. With Kix, this is only like 10 lines of codes
but this is not the proper forum for it.
 

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