Добрый день. Кто может сделать перевод формата из одной колонки в другую. Первую строку внес (как нужно сделать), нужно остальные сделать так же. Подсветил данные красным цветом.
Добрый день. Кто может сделать перевод формата из одной колонки в другую. Первую строку внес (как нужно сделать), нужно остальные сделать так же. Подсветил данные красным цветом.vsaykin88
et Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content], #"Inserted Text After Delimiter" = Table.AddColumn(Source, "Text After Delimiter", each Text.AfterDelimiter([Текстовое значение], "оранж,"), type text), #"Removed Columnsl" = Table.RemoveColumns(#"Inserted Text After Delimiter",{"Текстовое значение"}), #"Split Column by Delimiter" = Table.SplitColumn(#"Removed Columns", "Text After Delimiter", Splitter.SplitTextByDelimiter("(", QuoteStyle.Csv), {"Text After Delimiter.1", "Text After Delimiter.2"}), #"Split Column by Delimiter1" = Table.SplitColumn(#"Split Column by Delimiter", "Text After Delimiter.2", Splitter.SplitTextByDelimiter(")", QuoteStyle.Csv), {"Text After Delimiter.2.1", "Text After Delimiter.2.2"}), #"Changed Type" = Table.TransformColumnTypes(#"Split Column by Delimiter1",{{"Text After Delimiter.1", type text}, {"Text After Delimiter.2.1", type text}, {"Text After Delimiter.2.2", type text}}), #"Removed Columns1" = Table.RemoveColumns(#"Changed Type",{"Text After Delimiter.2.2"}), #"Replaced Value" = Table.ReplaceValue(#"Removed Columns1","-","; ",Replacer.ReplaceText,{"Text After Delimiter.1"}), #"Replaced Value1" = Table.ReplaceValue(#"Replaced Value","-","; ",Replacer.ReplaceText,{"Text After Delimiter.2.1"}), #"Merged Columns" = Table.CombineColumns(#"Replaced Value1",{"Text After Delimiter.2.1", "Text After Delimiter.1"},Combiner.CombineTextByDelimiter("-", QuoteStyle.None),"Merged"), #"Renamed Columns" = Table.RenameColumns(#"Merged Columns",{{"Merged", "Текстовое значение"}}) in #"Renamed Columns"
[/vba]
Power Query
[vba]
Код
et Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content], #"Inserted Text After Delimiter" = Table.AddColumn(Source, "Text After Delimiter", each Text.AfterDelimiter([Текстовое значение], "оранж,"), type text), #"Removed Columnsl" = Table.RemoveColumns(#"Inserted Text After Delimiter",{"Текстовое значение"}), #"Split Column by Delimiter" = Table.SplitColumn(#"Removed Columns", "Text After Delimiter", Splitter.SplitTextByDelimiter("(", QuoteStyle.Csv), {"Text After Delimiter.1", "Text After Delimiter.2"}), #"Split Column by Delimiter1" = Table.SplitColumn(#"Split Column by Delimiter", "Text After Delimiter.2", Splitter.SplitTextByDelimiter(")", QuoteStyle.Csv), {"Text After Delimiter.2.1", "Text After Delimiter.2.2"}), #"Changed Type" = Table.TransformColumnTypes(#"Split Column by Delimiter1",{{"Text After Delimiter.1", type text}, {"Text After Delimiter.2.1", type text}, {"Text After Delimiter.2.2", type text}}), #"Removed Columns1" = Table.RemoveColumns(#"Changed Type",{"Text After Delimiter.2.2"}), #"Replaced Value" = Table.ReplaceValue(#"Removed Columns1","-","; ",Replacer.ReplaceText,{"Text After Delimiter.1"}), #"Replaced Value1" = Table.ReplaceValue(#"Replaced Value","-","; ",Replacer.ReplaceText,{"Text After Delimiter.2.1"}), #"Merged Columns" = Table.CombineColumns(#"Replaced Value1",{"Text After Delimiter.2.1", "Text After Delimiter.1"},Combiner.CombineTextByDelimiter("-", QuoteStyle.None),"Merged"), #"Renamed Columns" = Table.RenameColumns(#"Merged Columns",{{"Merged", "Текстовое значение"}}) in #"Renamed Columns"