View Single Post
 
Old 08-07-2019, 02:03 AM
xor xor is offline Windows 10 Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default Looking for certain words in a string

With your text string in A1 use

=IFERROR(TRIM(MID(SUBSTITUTE(A1," ",REPT(" ",99)),MAX(1,FIND("marble",SUBSTITUTE(A1," ",REPT(" ",99)))-50),99)),"")

to extract marble.

In another cell to extract glass

=IFERROR(TRIM(MID(SUBSTITUTE(A1;" ";REPT(" ";99));MAX(1;FIND("glass";SUBSTITUTE(A1;" ";REPT(" ";99)))-50);99)),"")

and so on.
Reply With Quote