Skip to main content
Solved

Formula IF or Switch with multiple values

  • March 30, 2023
  • 2 replies
  • 23 views

Forum|alt.badge.img+3

Hello,

I have a table with fields like this :

 

The "First char" field is a formula that return the first character UPPER of the "First name" field.

 

 

Then, the field "check" is used to filter a view from A to E. So i need a formula that show "OK" if the "First char" field contain A or B or C,,,,,,,,,E or else it will show "KO"

Any ideas how to do it ?

 

Thanks.

Best answer by AirOps

Hi @Slim_BENAZIZA 

try this formula: 

IF(ISERROR(REGEX_EXTRACT({First char},"[A B C D E]"))=1, "KO", "OK")
 
I hope this helps!

2 replies

AirOps
Forum|alt.badge.img+10
  • Participating Frequently
  • Answer
  • March 30, 2023

Hi @Slim_BENAZIZA 

try this formula: 

IF(ISERROR(REGEX_EXTRACT({First char},"[A B C D E]"))=1, "KO", "OK")
 
I hope this helps!

Forum|alt.badge.img+3
  • Author
  • New Participant
  • April 3, 2023

Hi @Slim_BENAZIZA 

try this formula: 

IF(ISERROR(REGEX_EXTRACT({First char},"[A B C D E]"))=1, "KO", "OK")
 
I hope this helps!

Thank you so much !

 

Yes ! this solve my problem. And this formula works.