Solved

Look up certain symbol in text

  • 18 December 2023
  • 3 replies
  • 90 views

Badge +1

Hello, 

I have a dimension list with 1 column where all items are in the following format: XYZ or XY/ABC. 

 

I would like to add now a second column that will have 2 possible values: Product A or Product B (TEXT). 
-If you detect a “/” in the cell, please say Product A
-If not, please say Product B

I believe it is a variation of using if contains/mid.. however, I do not find the right formula. Would it be possible to help? 

Thank you very much! 

icon

Best answer by Issam Moalla 18 December 2023, 16:02

View original

3 replies

Userlevel 4
Badge +5

Hi @Olivia Van Gerven ,

In this case I would suggest using a combination of the FIND function and ISDEFINED:
So the formula would be:

IF(ISDEFINED(FIND("/",Items.Name)), Product."Product A", Product."Product B")

Where: 

  • FIND would return the first occurence if the symbol you are looking for exists or a BLANK 
  • ISDEFINED would flag as true the lines where there is a value

Hope this helps,
Issam

Userlevel 4
Badge +5

@Olivia Van Gerven , it can also be solved with contains like you mentionned:

IF(CONTAINS("/",Items.Name), Product."Product A", Product."Product B")

 

Badge +1

Hello, 

 

This works indeed, thank you very much!

Reply