I'm trying to find a single formula(preferable, Excel 2016)/VBA solution that would work in my case. Basically I have a column where every cell contains different text that looks like this
google (@), microsoft (#), hewlett and packard (@), tesla ($), random text i run out of names (@), another random text (%)
where x is different text. I need to extract all values that occur before (@) and (@) can occur up to 3 times within the same cell placed randomly (beginiing, middle, end). the output should look like
google, hewlett and packard, random text i run out of names
what would be the best solution? Thank you!
tried this solution
=CONCATENATE(TRIM(LEFT(SUBSTITUTE(MID(B3,FIND("~~",SUBSTITUTE(B3,"@","~~",1)),LEN(B3))," ",REPT(" ",100),1),100)),",",TRIM(LEFT(SUBSTITUTE(MID(B3,FIND("~~",SUBSTITUTE(B3,"@","~~",2)),LEN(B3))," ",REPT(" ",100),1),100)))
changing LEFT to RIGHT, but failed - it doesn't pick up the names to the right of (@)
"&SUBSTITUTE(A1,",","")&"