L
Les Isaacs
Hello All
I have a worksheet that will be used for simple data entry of name, address,
etc etc. - 1 column per field. One of the columns is for National Insurance
number, and one is for postcode (UK), and I am struggling to get the
validation for either of these.
National insurance number:
This must be in the format AA000000A (i.e. two letters followed by 6
numerics followed by one letter) - BUT only certain combinations of the
first two letters are valid (e.g. WD is OK but WR is not), and only certain
letters at the end are valid: I have a list of the valid combinations of
first two letters (there are 48 of them!) and the valid last letters (there
are 7).
Postcode:
There are 6 valid formats:
AN NAA - e.g. M1 1AA
ANN NAA - e.g. M60 1NW
AAN NAA - e.g. CR2 6XH
AANN NAA - e.g. DN55 1PT
ANA NAA - e.g. W1A 1HQ
AANA NAA - e.g. EC1A 1BB
But -
The letters Q, V and X are not used in the first position.
The letters I, J and Z are not used in the second position.
The only letters to appear in the third position are A, B, C, D, E, F, G, H,
J, K, S, T, U and W.
The only letters to appear in the fourth position are A, B, E, H, M, N, P,
R, V, W, X and Y.
The second half of the Postcode is always consistent numeric, alpha, alpha
format and the letters C, I, K, M, O and V are never used.
Hope someone can help.
Many thanks
Les
I have a worksheet that will be used for simple data entry of name, address,
etc etc. - 1 column per field. One of the columns is for National Insurance
number, and one is for postcode (UK), and I am struggling to get the
validation for either of these.
National insurance number:
This must be in the format AA000000A (i.e. two letters followed by 6
numerics followed by one letter) - BUT only certain combinations of the
first two letters are valid (e.g. WD is OK but WR is not), and only certain
letters at the end are valid: I have a list of the valid combinations of
first two letters (there are 48 of them!) and the valid last letters (there
are 7).
Postcode:
There are 6 valid formats:
AN NAA - e.g. M1 1AA
ANN NAA - e.g. M60 1NW
AAN NAA - e.g. CR2 6XH
AANN NAA - e.g. DN55 1PT
ANA NAA - e.g. W1A 1HQ
AANA NAA - e.g. EC1A 1BB
But -
The letters Q, V and X are not used in the first position.
The letters I, J and Z are not used in the second position.
The only letters to appear in the third position are A, B, C, D, E, F, G, H,
J, K, S, T, U and W.
The only letters to appear in the fourth position are A, B, E, H, M, N, P,
R, V, W, X and Y.
The second half of the Postcode is always consistent numeric, alpha, alpha
format and the letters C, I, K, M, O and V are never used.
Hope someone can help.
Many thanks
Les