Extract digits from string - Google spreadsheet

前端 未结 6 1033
情深已故
情深已故 2021-02-01 17:19

In Google spreadsheets, I need a formula to extract all digits (0 to 9) contained into an arbitrary string, that might contain any possible character and put them into a single

6条回答
  •  春和景丽
    2021-02-01 18:16

    You may replace all non-digit characters using the \D+ regex and an empty string replacement with

    =REGEXREPLACE(A11,"\D+", "")
    

    or with casting it to a number:

    =VALUE(REGEXREPLACE(A11,"\D+", ""))
    

提交回复
热议问题