View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Formula to get number

You need to convert the number to a fixed lenght string and then get the
right character.

in excel
=RIGHT(TEXT(A1,"###########"),1)
if you want the number instead of a character
=value(RIGHT(TEXT(A1,"###########"),1))


in VBA
mydigit = right(format(A1,"###########"),1)
if you want the number instead of a character
mydigit = value(right(format(A1,"###########"),1))


"Abdul" wrote:

Hello,

I have the following

Serial No check Digit

40212463794 4
40212463802 2
40212463810 0
40212463828 8
40212463836 6
40212463844 4
40212463851 1

The last number is a check digit and the check digit is arrived by
=Number-10*INT(Number/10)
The Number is including the check digit.

Now I want to get the number without check digit and check digit in
another column

so if I input the serial numbers like:


4021246379
4021246380
4021246381
4021246382
4021246383
4021246384
4021246385

then how can i get the check digit? Is there an easy formula?

Thanks

Abdul