Forum Discussion
roy verdonschot
Sep 18, 2018Copper Contributor
IFS(OR(ISNUMER(SEARCH( function
Is there a way to simplify this part of my IFS function:
IFS(OR(ISNUMBER(SEARCH("aanvraag opleiding",F619)),ISNUMBER(SEARCH("Aanvraag cursus",F619)),ISNUMBER(SEARCH("Toekenning aanvraag",F619)),ISNUMBER(SEARCH("Inschrijving opleiding",F619)),ISNUMBER(SEARCH("Coachingstraject",F619)),ISNUMBER(SEARCH("Volgen cursus",F619))),"Opleiding/training/coaching";...........................
It goes on after this and I have more of these repeated ISNUMBER(SEARCH( functions as logical tests and want to shorten them.
- edatuinCopper Contributorokey
- Philip WestSteel Contributor
Are you testing to see if any of those words show up in F619?
How about creating a list of words to check and then using match as your logic..
Something like, =if(isnumber(match(F619,Sheet2!$A$2:$A$10,0)),True,False)
even better would be to make it a table or named range. This would also have the advantage of making it really easy to add/change/remove things to search for at a later date.
- roy verdonschotCopper Contributor
Yes, that's what I'm testing. I like the idea, but I have to find the words in a bigger line of text within F619.
- Philip WestSteel Contributor
Ah. Try this then..
=or(if(isnumber(search(Sheet2!A2:A10)),F619,True,False))
You need to enter it as an array ctrl+shift+enter..