=IFERROR(IF($R$1=1,MID(O2,1,FIND(" ",O2,1)),MID(MID(MID(SUBSTITUTE(O2," ","^",$R$1),1,256),FIND("^",SUBSTITUTE(O2," ","^",$R$1)),256),2,FIND(" ",MID(MID(SUBSTITUTE(O2," ","^",$R$1),1,256),FIND("^",SUBSTITUTE(O2," ","^",$R$1)),256))-2)),RIGHT(O2,LEN(O2)-FIND("*",SUBSTITUTE(O2," ","*",LEN(O2)-LEN(SUBSTITUTE(O2," ",""))))) )
This will give you what ever word you want in the cell range("O2"). You can tell excel what word placement you want returned in cell range("R1"). The one catch is that if you want to return the 3rd word in a cell you will need range("R1") to be 2. This is because excel starts counting with 0. So to find the 3rd word you would have to have "word 0" then "word 1" then "word 2". See how "word 2" is the 3rd word in the cell.
Good luck.
No comments:
Post a Comment