Credit card numbers have a check digit at the end, this can catch a lot of typing errors.
I created a formula to test whether the number matches the check digit, note that this formula expects a 13 or 16 digit creditcard number entered in a cell formatted as text.
=(--RIGHT(B9,1)=(10-MOD(SUMPRODUCT(--MID("01234567891x3x5x7x9",MID(B9,ROW(INDIRECT("1:"&(LEN(B9)-1))),1)*(1+MOD(ROW(INDIRECT("1:"&(LEN(B9)-1))),2))+1,1)),10)))
You can try this on your own card number (I'm not giving you mine!), enter your number it should return true, change the last digit on the right and it should return false, changing any other digit should have the same effect!
Note changing 2 digits may or may not give false, as the changes could correct each other!
Bookmarks