I am trying to write the below formula using AF as my baseline referencing the buckets in AG thru AL as buckets identifying where AF falls in between and labeling however keep getting an error. Am i error out because of the last statement not being an "AND" statement and not closing the whole formula out right?
AF AG AH AI AJ AK AL
[TABLE="width: 474"]
<colgroup><col><col><col span="5"></colgroup><tbody>[TR]
[TD][/TD]
[TD]10[/TD]
[TD]20[/TD]
[TD]30[/TD]
[TD]40[/TD]
[TD]50[/TD]
[TD]60[/TD]
[/TR]
[TR]
[TD]Days Past due from Original Arrival[/TD]
[TD]Bucket[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]-10[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 474"]
<colgroup><col><col><col span="5"></colgroup><tbody>[TR]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
=IF(AND(AF3>0,AF3<=AG1, "0-10",IF(AND(AF3>AG1,AF3<=AH1,"10-20",IF(AND(AF3>AH1,AF3<=AI1,"20-30",IF(AND(AF3>AI1,AF3<=AJ1,"30-40",IF(AND(AF3>AJ1,AF3<=AK1,"40-50",IF(AND(AF3>AK1,AF3<=AL1,"50-60",IF(AF3>AL1,"Greater than 60 days", "OK")))))))))))))
AF AG AH AI AJ AK AL
[TABLE="width: 474"]
<colgroup><col><col><col span="5"></colgroup><tbody>[TR]
[TD][/TD]
[TD]10[/TD]
[TD]20[/TD]
[TD]30[/TD]
[TD]40[/TD]
[TD]50[/TD]
[TD]60[/TD]
[/TR]
[TR]
[TD]Days Past due from Original Arrival[/TD]
[TD]Bucket[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]-10[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 474"]
<colgroup><col><col><col span="5"></colgroup><tbody>[TR]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
=IF(AND(AF3>0,AF3<=AG1, "0-10",IF(AND(AF3>AG1,AF3<=AH1,"10-20",IF(AND(AF3>AH1,AF3<=AI1,"20-30",IF(AND(AF3>AI1,AF3<=AJ1,"30-40",IF(AND(AF3>AJ1,AF3<=AK1,"40-50",IF(AND(AF3>AK1,AF3<=AL1,"50-60",IF(AF3>AL1,"Greater than 60 days", "OK")))))))))))))