Find words and copy into next column in Excel -
i find , copy text next column in excel. have column a, text or sentences. want find particular word , copy word next column column b if word available in text of column a.
i have solution single word search , copy want apply multiple search , copy of different words:
=if(isnumber(search("processes", a4)), mid(a4, search("processes", a4), 9), "")
example:
suppose column contains text this:
"execution of procedure , processes". "all procedures correctly updated" "processes going smoothly".
i want search word "processes , procedure"
, should copy in column b (cell 1) "only if" either processes
or procedure
in text.
could please me out in this?
if need return 1 of words, can use:
=lookup(2,1/isnumber(search({"processes","procedures"},a4)),{"processes","procedures"})
or, can, example, put search words cells:
c1: processes d1: procedures =lookup(2,1/isnumber(search($c$1:$d$1,a4)),$c$1:$d$1)
the formula return error if neither word there; , can expanded number of words. if don't plain error message, can wrap above in iferror function , return like.
the search function array find_text return array of either number, or #value! isnumber function return array of true or false. division operation (1/isnumber) return array of 1 or #div/0! lookup lookup_value of 2 find last location of number equal or less 2; , return result_vector item in same position.
if need return both words, , can in different cells, enter array formula, , fill right number of words in search list:
e.g:
=iferror(index(if(search($c$1:$d$1,$a4),$c$1:$d$1,""),1,columns($a:a)),"")
to array-enter formula, after entering formula cell or formula bar, hold down ctrl-shift while hitting enter. if did correctly, excel place braces {...} around formula.
edit: screen shot added
Comments
Post a Comment