Forum Discussion
jklemm1
Oct 17, 2022Copper Contributor
Extraction formula help
I need a formula to extract the AC-UG from the text string below and then put them in two separate columns without using the text-to-columns feature - TIA! EM-AC-UG-Course-ENG-122-Week3-TOT
Lorenzo
Oct 17, 2022Silver Contributor
- Thanks OliverScheurich for copying/pasting your data and sharing the file
- You did not answer mathetes question re. version of Excel you use (this is important)
Attached is another Power Query option:
let
Source = Excel.CurrentWorkbook(){[Name="Tabelle1"]}[Content],
SplitInList = Table.AddColumn(Source, "LIST", each
List.FirstN(List.Skip(Text.Split([Spalte1], "-")), 2)
),
ToTable = Table.FromRows(SplitInList[LIST])
in
ToTable
And a 365 worksheet formula (spills as dynamic array) based on the same Table:
=DROP(
REDUCE(0,Tabelle1[Spalte1],
LAMBDA(seed,current,
VSTACK(seed, TEXTSPLIT(TEXTAFTER(TEXTBEFORE(current,"-",3),"-"),"-"))
)
), 1
)