# Nested IF AND formula: Error when encoding row-level formula: Syntax error. Extra ','

I'm trying to create a row-level formula to calculate the following:

I have a custom object called 'Car Transaction', with the following fields: 'Sign Up Fee' and 'Success Fee'

Here is what I want the formula to do:

I've counted all the commas and I can't find any extra ","

``````If(
AND(YEAR(Car_Transaction__c.SIGN_UP_DATE__c) = YEAR(TODAY())),
MONTH(Car_Transaction__c.SIGN_UP_DATE__c) = MONTH(TODAY()),
YEAR(Car_Transaction__c.Selling_Date__c) = YEAR(TODAY())),
MONTH(Car_Transaction__c.Selling_Date__c) = MONTH(TODAY()),
Car_Transaction__c.Sign_up_Fees__c + Car_Transaction__c.Success_Fee_Due__c,

If(
AND(YEAR(Car_Transaction__c.SIGN_UP_DATE__c) = YEAR(TODAY())),
MONTH(Car_Transaction__c.SIGN_UP_DATE__c) = MONTH(TODAY()),
NOT(YEAR(Car_Transaction__c.Selling_Date__c) = YEAR(TODAY())),
NOT(MONTH(Car_Transaction__c.Selling_Date__c) = MONTH(TODAY())),       Car_Transaction__c.Sign_up_Fees__c,

If(
AND(YEAR(Car_Transaction__c.Selling_Date__c) = YEAR(TODAY())),
MONTH(Car_Transaction__c.Selling_Date__c) = MONTH(TODAY()),
NOT(YEAR(Car_Transaction__c.SIGN_UP_DATE__c) = YEAR(TODAY())),
NOT(MONTH(Car_Transaction__c.SIGN_UP_DATE__c) = MONTH(TODAY())),       Car_Transaction__c.Success_Fee_Due__c,
NULL  )))
``````

try this :

``````If(
AND(YEAR(Car_Transaction__c.SIGN_UP_DATE__c) = YEAR(TODAY())),
MONTH(Car_Transaction__c.SIGN_UP_DATE__c) = MONTH(TODAY()),
YEAR(Car_Transaction__c.Selling_Date__c) = YEAR(TODAY()),
MONTH(Car_Transaction__c.Selling_Date__c) = MONTH(TODAY()),
Car_Transaction__c.Sign_up_Fees__c + Car_Transaction__c.Success_Fee_Due__c,

If(
AND(YEAR(Car_Transaction__c.SIGN_UP_DATE__c) = YEAR(TODAY())),
MONTH(Car_Transaction__c.SIGN_UP_DATE__c) = MONTH(TODAY()),
NOT(YEAR(Car_Transaction__c.Selling_Date__c) = YEAR(TODAY())),
NOT(MONTH(Car_Transaction__c.Selling_Date__c) = MONTH(TODAY())),       Car_Transaction__c.Sign_up_Fees__c,

If(
AND(YEAR(Car_Transaction__c.Selling_Date__c) = YEAR(TODAY())),
MONTH(Car_Transaction__c.Selling_Date__c) = MONTH(TODAY()),
NOT(YEAR(Car_Transaction__c.SIGN_UP_DATE__c) = YEAR(TODAY())),
NOT(MONTH(Car_Transaction__c.SIGN_UP_DATE__c) = MONTH(TODAY())),       Car_Transaction__c.Success_Fee_Due__c,
NULL  )))
``````

There was an extra `)` in this line ` YEAR(Car_Transaction__c.Selling_Date__c) = YEAR(TODAY())),`

• This fixed it. Thank you!! Dec 10, 2020 at 12:32