Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Find different strings in cell

Topic Labels: Formulas
Solved
Jump to Solution
343 2
cancel
Showing results for 
Search instead for 
Did you mean: 

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

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

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!