Home > OS >  Return validity status for mobile numbers in Google Sheets
Return validity status for mobile numbers in Google Sheets

Time:02-26

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:

  1. Convert to an array formula, so that only rows with data are assessed.
  2. When the lookup returns an error (Did not find value in VLOOKUP evaluation.), show the value (Country code invalid)

My demo sheet is here (editable): enter image description here

  • Related