+ Start a Discussion
Mac SwiftMac Swift 

Salesforce Formula field with multiple IF Statements

Hello Everyone, 
Please help me to resolve the below issue which is related to the formula field.
I need to add one more IF statement which says if  Custom FieldABC check box is unchecked then use the below formula.


CASE(IF(XYZ CUSTOM FIELD CHECKBOX ,1,2), 
IF(Price>=0 && Price<10, 1, 0), 1, 
IF(Price>=10 && Price<100, 1, 0), 2, 
IF(Price>=100 && Price<500, 1, 0), 3, 
IF(Price>=500 && Price<1000, 1, 0), 4, 
IF(Price>=1000 && Price<10000, 1, 0), 5, 
IF(Price>=100000, 1, 0), 6, 
0)
Sunil MadanaSunil Madana
CASE( 
     IF(AND(XYZ CUSTOM FIELD CHECKBOX ,1,2) , (ABC CUSTOM FIELD CHECKBOX ,1,2))
     IF (Price>=0 && Price<10, 1, 0), 1, 
     IF (Price>=10 && Price<100, 1, 0), 2, 
     IF (Price>=100 && Price<500, 1, 0), 3, 
     IF (Price>=500 && Price<1000, 1, 0), 4, 
     IF (Price>=1000 && Price<10000, 1, 0), 5, 
     IF (Price>=100000, 1, 0), 6, 
0 )
CASE( 
     IF(OR(XYZ CUSTOM FIELD CHECKBOX ,1,2) , (ABC CUSTOM FIELD CHECKBOX ,1,2))
     IF (Price>=0 && Price<10, 1, 0), 1, 
     IF (Price>=10 && Price<100, 1, 0), 2, 
     IF (Price>=100 && Price<500, 1, 0), 3, 
     IF (Price>=500 && Price<1000, 1, 0), 4, 
     IF (Price>=1000 && Price<10000, 1, 0), 5, 
     IF (Price>=100000, 1, 0), 6, 
0 )
Use whichever suits your requirement.