Can someone kindly help me with the following formula. The formula is working in one workbook but not another. I keep getting a nesting error. Thanks so much.

=IF(OR(A14={1,4,7,10}),1,IF(OR(A14={2,5,8,11}),2,IF(OR(A14={3,6,9,12}),3,IF(OR(A14={13,16,19,22}),4,IF(OR(A14={14,17,20,23}),5,IF(OR(A14={15,18,21,24}),6,IF(OR(A14={25,28,31,34}),7,IF(OR(A14={26,29,32,35}),8,IF(OR(A14={27,30,33,36}),9,0)))))))))