Tiago MF
Member
Hi guys
I created a formula to check if a NIF (Fiscal Identification Number) is valid.
The NIF is a 9 digits number, with the last one being a control digit which is calculated using the other eight digits the following way:
You can see the formula I created on the Upload File, cell D2, which was then copied to the rows below.
Problem is that the formula looks nastily long to me…I was wondering if there’s a clever way to simplify it
I’ve deconstructed my formula on Column G which makes it easier to follow the logic I applied.
Thanks in advance!
EDIT: File uploaded now
I created a formula to check if a NIF (Fiscal Identification Number) is valid.
The NIF is a 9 digits number, with the last one being a control digit which is calculated using the other eight digits the following way:
- Multiply the 1st digit by 9, the 2nd by 8, the 3rd by 7, …, and the 8th by 2;
- Sum up these results and then calculate the mod 11 of this sum;
- If the remainder is 0 or 1, the control digit will be 0;
- If it’s another number (x), the control digit is the result of 11 – x
You can see the formula I created on the Upload File, cell D2, which was then copied to the rows below.
Problem is that the formula looks nastily long to me…I was wondering if there’s a clever way to simplify it
I’ve deconstructed my formula on Column G which makes it easier to follow the logic I applied.
Thanks in advance!
EDIT: File uploaded now
Attachments
Last edited: