Help

Re: Find different strings in cell

Solved
Jump to Solution
1432 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Sebastian_Orell
5 - Automation Enthusiast
5 - Automation Enthusiast

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!

1 Solution

Accepted Solutions
Nick_Dennis
7 - App Architect
7 - App Architect

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.

See Solution in Thread

2 Replies 2
Nick_Dennis
7 - App Architect
7 - App Architect

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.

Works PERFECT, thank you very much!