I've made a good attempt at creating a formula in Google Sheets, which returns one of four statuses based on the assessment of the mobile number provided in a column.
The four statues are:
- Valid [when number length matches lookup table value]
- Invalid [when number length does not match lookup value]
- Valid (range) [when number length is between the shortest and longest number length inclusive]
- Invalid (range) [when number length is not within the range of shortest and longest number length]
I have a lookup table, which lists all international codes, with their shortest and longest number limits.
Wishlist:
- Convert to an array formula, so that only rows with data are assessed.
- When the lookup returns an error (Did not find value in VLOOKUP evaluation.), show the value (Country code invalid)