# Vehicle Identification Number Function

Oct 17, 2009I need a function to return a boolean T/F to check if a 17 character string meets the following checksum validation.

This is for Vehicle Identification Numbers for vehicle made after 1981

I need a VBA function that I can call multiple times in a workbook,

Example =VIN(A1) which returns True or False.

First, find the numerical value associated with each letter in the VIN. (I, O and Q are not allowed.) Digits use their own values.

A->1B->2C->3D->4E->5F->6G->7H->8

J->1K->2L->3M->4N->5P->7R->9

S->2T->3U->4V->5W->6X->7Y->8Z->9

Second, look up the weight factor for each position in the VIN except the 9th (the position of the check digit).

1st->82nd->73rd->64th->55th->46th->3

7th->28th->1010th->911th->812th->713th->6

14th->515th->416th->317th->2

Third, multiply the numbers and the numerical values of the letters by their assigned weight factor, and sum the resulting products. Divide the sum of the products by 11. The remainder is the calculated check digit. If the remainder is 10, the calculated check digit is the letter X.

Finally, if the calculated check digit did match the 9th digit of the VIN entered by a user, the VIN passed the checksum test. It failed the checksum test otherwise.