Created
January 4, 2021 15:59
-
-
Save davidfurlong/091fccce118fdf71fb15c7cc52244555 to your computer and use it in GitHub Desktop.
extracts first continuous number from a cell in google sheets. Examples "abc 30,00" => 30, "fsdf 10 fsdf 20" => 10 "abc12fee" => 12, "abc 30.0" => 30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Replace K2:K with your column letter and 2 with the row number of the current row. You only need to insert this into one cell in the column. | |
=ARRAYFORMULA(IF(ISERROR(regexextract(K2:K,"[0-9]+")), "", regexextract(K2:K,"[0-9]+"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment