validate data using formulae

J

jatman

i am making an employee form, and one cell must validate some information.
it can be manually, but if i can get excel to do it, it would be better. i'm
using office 07.

Cell E15 will have a 9 digit number (ex. 044-096-857)
the formula would validate this number and accept it or reject it (in our
case, this would be a valid number)
The formula would rewrite this number but needs to double every second
number. The rewritten number would be 08409128107. if you add up all of
these individual numbers, you get 40 - a multiple of 10, so the number is
valid and 044-096-857 would be validated and accepted in cell E15.

if E15 had 856-247-963, the formula would rewrite that to 810644149123.
this rewritten number adds up to 43 (not a multiple of 10, so an error would
be returned indicating invalid data.

any suggestions.

jat
 
S

smartin

My interpretation of that Wiki article is different than yours.

E.g., number to check = 456

Article says you add the digits, doubling every second value.
Numbers to sum = 4 + 10 + 6
Result = 20
Result MOD 10 = 0 == valid

You seem to be saying
Numbers to sum = 4 + 1 + 0 + 6
Result = 11
Result MOD 10 = 1 == invalid

I'm not saying either method is right or wrong, but a solution for you
depends on which algorithm you want to apply.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top