As a Coda newbie, I found writing formulas complicated. Example, I have the formula below. It has redundant embedded expressions.

If(thisRow.[List of Effective Dates].Count() <= 1,‘NULL’,WithName(WithName(Sequence(2,thisRow.[List of Effective Dates].count()).FormulaMap(CurrentValue.WithName(i,(thisRow.[List of Effective Dates].Nth(i-1).ToNumber() - thisRow.[List of Effective Dates].Nth(i).ToNumber())*-1)).Min(),minDate,Sequence(2,thisRow.[List of Effective Dates].Count()).FormulaMap(CurrentValue.WithName(i,(thisRow.[List of Effective Dates].Nth(i-1).ToNumber() - thisRow.[List of Effective Dates].Nth(i).ToNumber()) * -1)).Find(minDate)),minDateIndex,If((thisRow.[List of Effective Dates].Nth(minDateIndex + 1).Year()-thisRow.[List of Effective Dates].Nth(mindateIndex).Year()!=0),thisRow.[List of Effective Dates].Nth(minDateIndex + 1).Year() - thisRow.[List of Effective Dates].Nth(minDateIndex).Year(),WithName((thisRow.[List of Effective Dates].Nth(minDateIndex + 1).ToNumber() - thisRow.[List of Effective Dates].Nth(minDateIndex).ToNumber())/365,lessThanAYear,[Less Than One Year Gap].Nth(WithName([Less Than One Year Gap].FormulaMap(AbsoluteValue(CurrentValue-lessThanAYear)).Min(),Minimum ,[Less Than One Year Gap].FormulaMap(AbsoluteValue(CurrentValue-lessThanAYear)).Find(Minimum) ))))))

Is there any way, I can simplify it? Its very hard to maintain and debug.