Ask Search:
Dane WagnellDane Wagnell 

Formula Field Help

I am trying to create the this formula from Excel into Salesforce.

IF(AND(DBRS__c="Rated",Unrated_c="YES"),"DBRS Rated",IF(AND(DBRS__c="N",Unrated_c="No"),"Other Rated","Not Rated"))

DBRS_c and Unrated_c are both PICKLIST fields

I have created a formula field with a text Return Type

Thanks,
Dane

 
Best Answer chosen by Dane Wagnell
Tony TrinhTony Trinh
Hello Dane,
Give this a try:
IF(
	AND(
		TEXT(DBRS__c)="Rated",
		TEXT(Unrated__c)="YES"),
	"DBRS Rated",
	IF(
		AND(
			TEXT(DBRS__c)="N",
			TEXT(Unrated__c)= "No"),"Other Rated",
		"Not Rated")
	)

Please note the "Yes" in the formula has to match the picklist exactly, case included (e.g. "Yes" and "YES" will not match)