0

I"ve a data table (1) below and want the result as in table (2). How can I do this?

Click here to check the table 1 and 2

3 Answers 3

1

I'd suggest the following:

  • Delete duplicate rows using Remove Rows > Remove Duplicates
  • Group your table using concatenation (see this question)
  • Split the concatenated State column using Split Column > By Delimiter.
Sign up to request clarification or add additional context in comments.

Comments

0

You could use this code:

let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    group = Table.Group(Source, {"Name"}, {{"State", each Text.Combine(List.Distinct([State]), "|")}}),
    split = Table.SplitColumn(group, "State", Splitter.SplitTextByDelimiter("|", QuoteStyle.Csv), {"State.1", "State.2", "State.3"})
in
    split

result

Comments

-1

Have a look a this topic: VBA excel, concatenate cells when there are duplicates .

You could use that vlookupall function and then use "Text to column" on your result.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.