Range("AT2").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC1=""JAN"",1,IF(RC1=""FEB"",2,IF(RC1=""MAR"",3,IF(RC1=""APR"",4,IF(RC1=""MAY"",5,IF(RC1=""JUN"",6,0))))))"
Range("AU2").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC1=""JUL"",7,IF(RC1=""AUG"",8,IF(RC1=""SEP"",9,IF(RC1=""OCT"",10,IF(RC1=""NOV"",11,IF(RC1=""DEC"",12,0))))))"
this code above looks at cell a1 to see what month it is then gives it the corresponding number ie jan = 1 , feb = 2 and so on, the code has been wrote in 2 cells, at2 calculates jan to jun and au2 calculates jul to dec
how can i put these in on cell, so that at2 looks at a1 and decides if it is 1 2 3 4 5 6 7 8 9 10 11 or 12
Bookmarks