Forum Discussion
LWMorton
May 20, 2019Copper Contributor
Searching For Text
I am looking to create a formula that searches a cell full of text and if it contains words from a certain list, the cell will display "0", if it contains words from a different list, then it will display a "1" all the way up to 4. All of the equations I have tried are IF functions that return only a TRUE/FALSE
The text I want to search is the descriptor attached to the students on the right. On the left is a table of the words that are command terms for each level. I hope this makes sense.
LWMorton , perhaps
=IF(SUMPRODUCT(--ISNUMBER(SEARCH($AF$2:$AF$8,B2))), 4, IF(SUMPRODUCT(--ISNUMBER(SEARCH($AE$2:$AE$8,B2))), 3, IF(SUMPRODUCT(--ISNUMBER(SEARCH($AD$2:$AD$8,B2))), 2, IF(SUMPRODUCT(--ISNUMBER(SEARCH($AC$2:$AC$8,B2))), 1))))in C2 and copy it to another cells
5 Replies
- SergeiBaklanDiamond Contributor
LWMorton , perhaps
=IF(SUMPRODUCT(--ISNUMBER(SEARCH($AF$2:$AF$8,B2))), 4, IF(SUMPRODUCT(--ISNUMBER(SEARCH($AE$2:$AE$8,B2))), 3, IF(SUMPRODUCT(--ISNUMBER(SEARCH($AD$2:$AD$8,B2))), 2, IF(SUMPRODUCT(--ISNUMBER(SEARCH($AC$2:$AC$8,B2))), 1))))in C2 and copy it to another cells
- LWMortonCopper Contributor
SergeiBaklan that has worked perfectly, you are my saviour!
- SergeiBaklanDiamond Contributor
LWMorton , glad to help