#### iferror

##### Member

new to the board but been lurking around for quite some time...and this is the section i love most!

I know i'm probably just going to tickle you a little bit, this is a fairly easy challenge, but nevertheless i'd like to know if there's an alternative solution to the problem at hand.

I'm pretty sure you know what an IMEI is. The structure of the IMEI is as follows: AA-BBBBBB-CCCCCC-D

AA-BBBBBB - is known as Type Allocation Code

CCCCC - represents the serial number

D- is the Luhn check digit for the IMEI

The Luhn algorithm is applied to the first 14 digits of the IMEI and returns only one digit (the last one of the IMEI).

To get the Luhn check digit you have to:

- double every other digit

- sum all the digits

- 10 - (mod(sum;10))

i.e.

IMEI:

12345678901234?

-double every other digit -->

1(4)3(8)5(12)7(16)9(0)1(4)3(8)

- sum all the digits -->

1+(4)+3+(8)+5+(1+2)+7+(1+6)+9+(0)+1+(4)+3+(8) = 63

- 10 - (mod(sum;10)) -->

10-3=7

so ? is 7

The challenge is:

write a single formula that, given an IMEI, would check the last digit and return either TRUE or FALSE according to Luhn Check

So

A1=123456789012349 --> =formula(A1) --> FALSE

whereas

A1=123456789012347 --> =formula(A1) --> TRUE

Looking forward to be amazed by any solution you may come up to.