Skip to main content
Solved

2 conditions IF formula

  • July 28, 2023
  • 5 replies
  • 57 views

Forum|alt.badge.img+3
IF({Status}='Complete','✅','❌')
IF({Status}='Billed','✅','❌')
 
It does not let me, how can I combine them for one formula?
The status section has 15 statuses, but only these 2 can go green.
Please help!

Best answer by Ben_Young1

Since it has multiple options in status, I need to select COMPLETE when a driver completed the route and I will go Green 

 "✔"

And when I bill the route, I have to select BILLED option too, but when I use this formula, it comes back with an X becouse I selected 2 options, the Complete and Billed.
The task is to, when I multi-select Complete and Billed, it should be Green Check point. If there any other options, well X is fine.  


Ooof... while I pretty broadly advise against the use of multiple select fields, here's a formula that does what you're looking for:

IF( {Status}, IF( OR( REGEX_MATCH( {Status}, 'Complete' ), REGEX_MATCH( {Status}, 'Billed' ) ), "✔", "❌" ), "❌" )

5 replies

Ben_Young1
Forum|alt.badge.img+22
  • Brainy
  • July 28, 2023

 

IF( OR( {Status} = "Complete", {Status} = "Billed" ), "✔", "❌" )

 


Forum|alt.badge.img+21
  • Inspiring
  • July 29, 2023

or use the switch function

SWITCH({Status}, "Complete","done", "Billed","done", "x" )

 


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

 

IF( OR( {Status} = "Complete", {Status} = "Billed" ), "✔", "❌" )

 


Since it has multiple options in status, I need to select COMPLETE when a driver completed the route and I will go Green 

 "✔"

And when I bill the route, I have to select BILLED option too, but when I use this formula, it comes back with an X becouse I selected 2 options, the Complete and Billed.
The task is to, when I multi-select Complete and Billed, it should be Green Check point. If there any other options, well X is fine.  


Ben_Young1
Forum|alt.badge.img+22
  • Brainy
  • Answer
  • July 30, 2023

Since it has multiple options in status, I need to select COMPLETE when a driver completed the route and I will go Green 

 "✔"

And when I bill the route, I have to select BILLED option too, but when I use this formula, it comes back with an X becouse I selected 2 options, the Complete and Billed.
The task is to, when I multi-select Complete and Billed, it should be Green Check point. If there any other options, well X is fine.  


Ooof... while I pretty broadly advise against the use of multiple select fields, here's a formula that does what you're looking for:

IF( {Status}, IF( OR( REGEX_MATCH( {Status}, 'Complete' ), REGEX_MATCH( {Status}, 'Billed' ) ), "✔", "❌" ), "❌" )

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

Ooof... while I pretty broadly advise against the use of multiple select fields, here's a formula that does what you're looking for:

IF( {Status}, IF( OR( REGEX_MATCH( {Status}, 'Complete' ), REGEX_MATCH( {Status}, 'Billed' ) ), "✔", "❌" ), "❌" )

Waw, works great. Thank you!!!! 💪