Function digtov(rut as String) t = 2 For i = 0 To Len(rut) - 1 aux = aux + Val(Mid$(rut, Len(rut) - i, 1)) * t If t > 6 Then t = 2 Else t = t + 1 End If Next i aux1 = 11 - (aux Mod 11) If aux1 < 10 Then dv = aux1 Else dv = "K" End If End Function