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
HansVogelaar
Oct 17, 2022MVP
Let's say you have such text strings in B2 and down.
For the first part:
=TRIM(MID(SUBSTITUTE(B2,"-",REPT(" ",255)),256,255))
For the second part:
=TRIM(MID(SUBSTITUTE(B2,"-",REPT(" ",255)),512,255))
Fill down.
Alternatively, enter AC in a cell next to the cell with the fill string, then select Fill > Flash Fill on the Home tab of the ribbon.
Do the same with UG in the cell next to the one with AC.