Search code examples
google-apps-scriptgoogle-sheetsgoogle-sheets-formulaextractphone-number

10 digit numbers to be extracted from data on fixed rows on Google sheet


I need to extract 10 digit numbers from data sets on individual rows

The position of each row in the sheet is to remain the same.

When multiple 10 digit numbers are available on row needs to come together in a single cell with comma.

sharing a screenshot Google sheet and link to Google sheet link


Solution

  • Use like this:

    B2 → =IFERROR(JOIN(", ",FILTER(FLATTEN(C2:O2),LEN(FLATTEN(C2:O2))=10)))
    B3 → =IFERROR(JOIN(", ",FILTER(FLATTEN(C3:O3),LEN(FLATTEN(C3:O3))=10)))
    B4 → =IFERROR(JOIN(", ",FILTER(FLATTEN(C4:O4),LEN(FLATTEN(C4:O4))=10)))
    B5 → =IFERROR(JOIN(", ",FILTER(FLATTEN(C5:O5),LEN(FLATTEN(C5:O5))=10)))
    B6 → =IFERROR(JOIN(", ",FILTER(FLATTEN(C6:O6),LEN(FLATTEN(C6:O6))=10)))
    

    And so on...

    enter image description here

    Reference: