How do I isolate a numerical value from a cell in Google Sheets?

I’m using Google Sheets where each cell is formatted with a sequence that includes a numeric value, a unit, an item, and a description.

I need a method to extract just the number and transfer it to the adjacent cell. I would appreciate detailed guidance on which formulas or functions can accomplish this task in a way that applies consistently across multiple cells. Are there any specific tips or approaches that can help automate the process effectively?

An alternative to using regex is to exploit the consistent structure of your cells. If the numeric value always comes first followed by a space, this method can be both simple and reliable. I have used a formula that applies basic text functions, for instance, =VALUE(LEFT(A1, FIND(" ", A1)-1)). This formula isolates the initial sequence of characters before the first space and transforms it into a number. This method can be very efficient for uniform data and may prove easier to maintain compared to more complex regex patterns.

I have had success using the REGEXEXTRACT function to handle this type of extraction. In my sheets, I typically use a formula like =REGEXEXTRACT(A1,“[0-9]+(?:.[0-9]+)?”) which helps pick out both integers and decimals. This method proved flexible as it adapts to most combinations of text and numbers that appear in cell contents. Adjustments may be necessary if negative numbers or different formats are present. Overall, it automated a lot of tedious data cleaning and improved efficiency.