View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Calculate the value of Z

And we can further shorten the formula for Z to this...

=MOD(SUMPRODUCT((10-ROW(A1:A9))*MID(A1&B1,ROW(A1:A9),1)),10)

--
Rick (MVP - Excel)


"Rick Rothstein" wrote in message
...
And I believe the formula for Z can be shortened to this...

=MOD(SUMPRODUCT((10-ROW(A1:A7))*MID(A1,ROW(A1:A7),1))+MID(B1,2,1)+2*MI D(B1,1,1),10)

--
Rick (MVP - Excel)


"Rick Rothstein" wrote in message
...
=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)


You don't really need the SUM function...

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

--
Rick (MVP - Excel)