Finding specific text in a string

Userlevel 5
Badge +8

This was asked internally, and I thought I’d share the answer in case it’s of use to others!

If you have a specific term you want to look for, in this case ‘Intern’, it can come up in Position names, but you may get false flags for longer words like ‘International’

To identify these, I’ve created an IF statement that checks if the term is in use by checking for the trailing space, or checking if it’s the last word in use.


First, use RIGHT, with 6 being the number of characters required to identify the word.



Second, look for the word “Intern “ including the trailing space.

IF(CONTAINS("Intern ", Positions.Name), TRUE, FALSE)


Then you just need to nest these to make one formula

IF(RIGHT(Positions.Name,6) = "Intern", TRUE, IF(CONTAINS("Intern ", Positions.Name), TRUE, FALSE))


It even works with International Interns!


2 replies

Userlevel 5
Badge +8

My colleague pointed out another way to achieve this;

CONTAINS(" Intern "," " & Position.Name & " ")


Userlevel 4
Badge +7

Nice solutions!