Forum Discussion

L_Oram's avatar
L_Oram
Regular Visitor
3 years ago

Extract ref number from free text column

Good Afternoon,

 

I'm trying to extract a reference number into its own column. The reference is sometimes input but not always present.

The reference will always start with "SMIS" and will have a varying amount of numbers directly following it (normally there are 5, 6 or 7 numbers in the reference).

 

What is the best way to pull this ref out?

 

 

1 Reply

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    L_Oram Perhaps use Text.Split to convert the text into a list using a space as separator. Then you could use List.MatchesAll with a condition based on Text.Start (SMIS).