Find different strings in cell

Hello everyone,

I would like to have a formula column in a table where I have a code name as the first column today. This formula should check the code and give me a determinated result.

Today my codes are SFPAPXXXXRI004, or SFPAPXXXXBA005. I would like a column that says “Ring” if there is an “RI” on the code or “Bracelet” when there is a “BA” and so on.

Is this possible.

Many thanks for your help!

If you already have the unique codes in the table, then you can perform a SEARCH() in a formula and return results only if the search phrase is found in the string by using IF statements.

Assuming a field name of {Code ID}, I would create a new Formula Field to display the product type, with a formula of:

IF(SEARCH(“RI”, {Code ID}), “Ring”, IF(SEARCH(“BA”, {Code ID}),“Bracelet”))

This should output “Ring” or “Bracelet” only if it finds an “RI” or “BA” within the string it’s searching. You could add additional rules by using nested IF statements. Keep in mind the search is case sensitive.

Hope that helps.

1 Like

Works PERFECT, thank you very much!

1 Like

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.