Power Query: Extract Numbers from a Text String
- MirVel

- Mar 13
- 1 min read
Updated: May 28
Function: Extracts only the numeric values from a given text. Simply add custom function in Power Query and define your column.

Usage:
= ExtractNumbers("Order ID: 123ABC456") → Returns: "123456"Power Query code for use and reuse:
let ExtractNumbers = (inputText as text) as text => let NumbersOnly = Text.Select(inputText, {"0".."9"}) in NumbersOnlyin ExtractNumbers
Need a code and instructions? Free of charge =)







Comments