Thanks for your post but it's not giving me the result I need.
After testing your caculation it returns a 6 for the serial number UV432007QHU, but in this instance I would need the 0 in the middle?
I think your calculation just counts the middle character, but I need to know exactly what it is, eg, 0 in the serial number above.