How do you use Splitter.SplitTextByAnyDelimiter??

jilbobagins

Member
Joined
Apr 11, 2019
Messages
80
Reaction score
0
Points
6
Excel Version(s)
2016
Hi All, I've got a particularly messy column of data that need splitting by virtually all of the delimiters (and Special Characters). Can the Splitter.SplitTextByAnyDelimiter function handle all of this? Anyone have any experience with it?

Thanks
 
So you have a column of data that looks something like this:
<data1>|<data2>.<data3>:<data4>,<data5> and you want 5 columns (in this example) of each piece of data?

Then this should work:
Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Custom1 = Table.SplitColumn(Source, "Column", Splitter.SplitTextByAnyDelimiter({"|",".",":",","}, QuoteStyle.Csv))
in
    Custom1
 
Thanks for responding! I'll give that a try now.
 
Hi, It only applies the split to the "Column" and doesn't create multiple new columns?? any ideas?
 
I manually added the additional columns on the end and it works a treat then!

Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Renamed Columns" = Table.RenameColumns(Source,{{"Column", "Column1"}}),
    Custom1 = Table.SplitColumn(#"Renamed Columns", "Column1", Splitter.SplitTextByAnyDelimiter({"/", " ", "&", ","}, QuoteStyle.Csv), {"Column1.1.1", "Column1.1.2", "Column1.1.3"})
in
    Custom1
 
Back
Top