Merge dynamic columns' name

shuyin

New member
Joined
Aug 11, 2016
Messages
26
Reaction score
0
Points
0
Excel Version(s)
2016
Hi,

How can I choose all the column start with a specific text or any dynamic selection in the Merge column function?
here is an example:
ABAAAB
cxcb


--> choose all column start with "A", and merge them to have result: ccb

Thanks,
T
 
Hi shuyin,

You can use a pattern like this (Text.Combine can be replaced with another function if you are doing something different from concatenating text):
Code:
= Table.CombineColumns ( [B]PreviousStep[/B], List.Select ( Table.ColumnNames ( [B]PreviousStep[/B] ), each Text.StartsWith ( _, "A" ) ), [COLOR=#ff0000][B]Text.Combine[/B][/COLOR], "MergedColumnName" )
 
Back
Top