View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
CLI-Art[_2_] CLI-Art[_2_] is offline
external usenet poster
 
Posts: 6
Default Mod 43 Check Digit calculator

I am a newer user to excel and this post has me lost. Can you "dumb" it up a
bit?

"Nigel" wrote:

Here is a UDF. Add it to a standard code module and use formula in cell.
e.g.

=ModFT("123") as a direct conversion of some text or
=ModFT(A3) as a range reference


Const charSet As String = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%"
Function ModFT(sValue As String)
Dim i As Integer, T As Long
For i = 1 To Len(Trim(UCase(sValue)))
T = InStr(charSet, Mid(sValue, i, 1)) - 1 + T
Next i
ModFT = sValue & Mid$(charSet, (T Mod 43 + 1), 1)
End Function

--

Regards,
Nigel




"CLI-Art" wrote in message
...
Is there a mod43 check digit calculator in Excel. If not, has anyone out
there made one?