View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default Calculate the value of Z

=MOD(SUM(MID(A1,1,1)*9,MID(A1,2,1)*8,MID(A1,3,1)*7 ,MID(A1,4,1)*6,MID(A1,5,1)*5,MID(A1,6,1)*4,MID(A1, 7,1)*3,MID(B1,1,1)*2,MID(B1,2,1)*1),10)

Check your example, it doesn't suit the formula!

Regards,
Stefi

€˛Harshad€¯ ezt Ć*rta:

My equation is ABCDEFG-HI-Z, all alphabets (A,B,C,D,E,F,G,H,I) have value
between 0-9.

I have to calculate the value of Z, as follows.

Value of Z is = {( I*1) + (H*2 ) + (G*3 ) + (F*4 ) + (E*5 ) + (D*6 ) + (C*7
) + (B*8 ) + (A*9 )}/ 10

= Q + Z/10, where Q and Z represents integer and remainder respectively

For eg. 1034526-98-Z.
Z can be calculated as,

= {( 9*1) + (8*0 ) + (7*3 ) + (6*4 ) + (5*5 ) + (4*2 ) + (3*6 ) + (2*9 ) +
(1*8 )}/ 10

= {9 + 0 + 21 + 24 + 25 + 8 + 18 + 18 + 8}/10

= 131/10

= 13 + 1/10

So, Z = 1.

In excel, if ABCDEFG numerals are in cell A1, HI numerals are in cell B1 and
Z is in cell C1. I want formula, which gives the value of Z between 0-9.

Thank in advance.

Harshad