The most elegant way to do this: @MONTH(1+@MOD(@MONTH(A1),12)) This avoids the duplicate expressions that @IF requires.