function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Dikla TenenboimDikla Tenenboim 

Creating a Formula Field

Hello,

i'm tring to create a new formula field, based on 2 picklists.
I wrote down the following formula and i got a syntax error:

IF(AND( ISPICKVAL(Color__c ="red"),ISPICKVAL( Car_Category__c ="mini")),1, IF(AND( ISPICKVAL(Color__c ="blue"), ISPICKVAL(Car_Category__c ="manager"),2), IF (AND( ISPICKVAL(Color__c ="yellow"),ISPICKVAL( Car_Category__c ="premium"),40),null))

I need your assistence 
Thanks
Dikla
ArmouryArmoury
Can you check this.
 
IF(
AND( 
	ISPICKVAL(Color__c ,"red"),
	ISPICKVAL(Car_Category__c,"mini")
	),1, 
	IF(
		AND(
			ISPICKVAL(Color__c ,"blue"),
			ISPICKVAL(Car_Category__c,"manager")
			), 2, 
			IF(
				AND(
					ISPICKVAL(Color__c ,"yellow"),
					ISPICKVAL(Car_Category__c,"premium")
					), 40, null
			)
	)
)