ShowAll Questionssorted byDate Posted
Lukasz Piziak

# Case formula with two criteria.

Hi,
I'm looking for help with creating CASE formula to work with two criterias:
Below formula is working fine,
CASE( SCMC__Production_Order__c.Label_Band_Colour__c ,'Red', Red Band ,'Black', Black Band, N/A)

What if I would like to add another criteria to formula above? e.g
CASE( SCMC__Production_Order__c.Label_Band_Colour__c ,'Red', Red Band ,'Black', Black Band, N/A)
OR
CASE( SCMC__Production_Order__c.Body_Colour__c ,'Red', Red Body ,'Black', Black Body, N/A)

Thanks for any help with this

Regards
Lukasz
Best Answer chosen by Lukasz Piziak
LBK

```if(SCMC__Production_Order__c.Label_Band_Colour__c  = 'Red', Red Band ,
if(SCMC__Production_Order__c.Label_Band_Colour__c  = 'Black', Black Band,
if(SCMC__Production_Order__c.Body_Colour__c = 'Red', Red Body ,
if(SCMC__Production_Order__c.Body_Colour__c = 'Black', Black Body, N/A))))```
Let me know if this help.

LBK
What would be the output you are expecting?
In my opinion, these two formulas have two different output.
One formula based on Label_Band_Colour__c gives out a Band color (Red Band, Black Band or N/A).
Another formula based on Label_Body_Colour__c gives out a Body color (Red Body, Black Body or N/A).

Will your combined formula give out only one output?
Lukasz Piziak
Yes, it would be only one output.
LBK
What would be the output?

Say, if Label_Band_Colour__c = Red and Label_Body_Colour__c = red, what would be the output?

What if Label_Band_Colour__c = Red and Label_Body_Colour__c = black?

Can you elaborate on the use case a little?

Lukasz Piziak
Sorry, it will never happen that both option would be selected. So If someone is selecting the banner colour will never select the body colour.

LBK
```if(SCMC__Production_Order__c.Label_Band_Colour__c  = 'Red', Red Band ,