A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Hi @Josh-8092,
To avoid using the OFFSET function which is an volatile function I think it is better for you to use the following formula.
In this formula the third column (Number) is not used as such is not necessary.
=VSTACK(A1:B1, TEXTSPLIT(TEXTJOIN(";",, TOCOL(A2:A5 & "," & TEXTSPLIT(TEXTJOIN(";",, B2:B5), "|", ";"), 3)), ",", ";"))
Or you can use Power Query. Below is the M code. Name the table as Data.
let
Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content],
#"Split Column by Delimiter" = Table.SplitColumn(Source, "Colour", Splitter.SplitTextByDelimiter("|", QuoteStyle.Csv), {"Color.1", "Color.2", "Color.3"}),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Split Column by Delimiter", {"Fruit", "Number"}, "Attribute", "Colour"),
#"Removed Columns" = Table.RemoveColumns(#"Unpivoted Columns",{"Number", "Attribute"})
in
#"Removed Columns"
Hope this helps.
IlirU