Forum Discussion
mustafa kun
Dec 01, 2018Copper Contributor
finding a specified word from the sentence in the cell and put in the other cell
Hello, I have very long door specification table. In the attached file in the "A" column the specification of door is written as a sample. I want to see in the "B" column the material of door . I wr...
- Dec 01, 2018
Hi Mustafa,
That could be
=MID(A2,SEARCH(" cm ",A2)+4,SEARCH("door",A2)-SEARCH(" cm ",A2)-5)
mustafa kun
Dec 01, 2018Copper Contributor
Hello Sergei,
Thank you, yes it works 1 exactly what I wanted. Thank you so much.
Honestly I may say that I didn't understand how it works this magical formula but really great :)
SergeiBaklan
Dec 01, 2018Diamond Contributor
How it works:
MID(A2, 12, 6) returns text which is in A2 starting from 12th positions and 6 characters length;
SEARCH(" cm ", A2) finds the position of the " cm " in A2. +4 gives where next word starts (since " cm " is 4 characters length). Let say it'll be 12.
SEARCH("door", A2) finds the position where "door" starts. Extracting from it previous result minus one we receive the length of the text to extract (let say 6).