I recommend you to format such big formulas. Once you do it, you see, that you missed to pass one parameter to last IF
condition: "High Profile is neither false nor true". So, considering, that High_Profile__c
isn't boolean
IF(
AND(
High_Profile__c = "True" ,
ISPICKVAL(Priority, "P1")
),
"Msg1",
IF(
AND(
High_Profile__c = "True" ,
NOT(ISPICKVAL(Priority,"P1"))
),
"Msg2" ,
IF(
High_Profile__c = "False",
"No",
"High Profile is neither false nor true"
)
)
)
your formula can be re-written in the following more readable way:
IF(
High_Profile__c = "True",
IF(
ISPICKVAL(Priority, "P1"),
"Msg1",
"Msg2"
),
IF(
High_Profile__c = "False",
"No",
"High Profile is neither false nor true"
)
)
if you can have High_Profile__c
as boolean (Checkbox) field type, this formula becomes very simple:
IF(
High_Profile__c,
IF(
ISPICKVAL(Priority, "P1"),
"Msg1",
"Msg2"
),
"No"
)