Forum Discussion
Alejandro Murillo Ramirez
Sep 27, 2018Copper Contributor
HOW TO: "If cell contains specific text display the immediate next word after it"
I have an excel file with each individual cell filled with data as it follows: Alejandro - GREEN Daniel - RED Sebastian - BLUE What I have been trying to do is to use a formula to extract the ...
SergeiBaklan
Sep 27, 2018Diamond Contributor
That could be
=MID(M26,FIND("-",M26)+2,FIND("-",M26,FIND("-",M26)+1)-FIND("-",M26)-2)
- Alejandro Murillo RamirezSep 27, 2018Copper Contributorfor some reason this returns the word after the "-" and the first word on the next line of the same cell, i included a copy of the original file in my original comment now to avoid confusing everyone
- SergeiBaklanSep 27, 2018Diamond Contributor
If only from first line (actually second in the cell since 27 is in the first line)
=MID(M26,FIND("-",M26)+2,FIND(CHAR(10),M26,FIND(CHAR(10),M26)+1)-FIND("-",M26)-2)
and attached
- Alejandro Murillo RamirezSep 27, 2018Copper Contributor
Edit: now that i notice it never asks which name it is substracting from :/ it got the first one instead, not quite the thing but sooo close!
One quick question, how would you make it dynamic? so that it uses the cell that matched the countifs conditional i have on column O instead of a hardcoded "M26"?