Hi,
My formula works when I type it in. However, when i try recording it "unable to record macro" appears. I read somewhere that excel doesn't record macros if the cell has more than 255 characters.
=IF(OR(AND(AND($N$2>=1,$N$2<=179),(AND(E2>=181,E2<=359))),(AND(AND($N$2>=181,$N$2<=359),(AND(E2>=1,E2<=179))))),"OPP",IF(OR(AND(AND($N$2>=1,$N$2<=179),(AND(E2>=1,E2<=179))),(AND(AND($N$2>=181,$N$2<=359),(AND(E2>=181,E2<=359))))),"SAME",IF(OR(OR($N$2=0,$N$2=180),(OR((E2=0),(E2=180)))),"VER","")))
I tried typing this in VBA but "compile error: expected: end of statement pops up".
Range("I2").Select
ActiveCell.Formula = _
"=IF(OR(AND(AND($N$2>=1,$N$2<=179),(AND(E2>=181,E2<=359))),(AND(AND($N$2>=181,$N$2<=359),(AND(E2>=1,E2<=179))))),"OPP",IF(OR(AND(AND($N$2>=1,$N$2<=179),(AND(E2>=1,E2<=179))),(AND(AND($N$2>=181,$N$2<=359),(AND(E2>=181,E2<=359))))),"SAME",IF(OR(OR($N$2=0,$N$2=180),(OR((E2=0),(E2=180)))),"VER","")))"
I was wondering if anyone could help me? Would really appreciate it.
Thanks
My formula works when I type it in. However, when i try recording it "unable to record macro" appears. I read somewhere that excel doesn't record macros if the cell has more than 255 characters.
=IF(OR(AND(AND($N$2>=1,$N$2<=179),(AND(E2>=181,E2<=359))),(AND(AND($N$2>=181,$N$2<=359),(AND(E2>=1,E2<=179))))),"OPP",IF(OR(AND(AND($N$2>=1,$N$2<=179),(AND(E2>=1,E2<=179))),(AND(AND($N$2>=181,$N$2<=359),(AND(E2>=181,E2<=359))))),"SAME",IF(OR(OR($N$2=0,$N$2=180),(OR((E2=0),(E2=180)))),"VER","")))
I tried typing this in VBA but "compile error: expected: end of statement pops up".
Range("I2").Select
ActiveCell.Formula = _
"=IF(OR(AND(AND($N$2>=1,$N$2<=179),(AND(E2>=181,E2<=359))),(AND(AND($N$2>=181,$N$2<=359),(AND(E2>=1,E2<=179))))),"OPP",IF(OR(AND(AND($N$2>=1,$N$2<=179),(AND(E2>=1,E2<=179))),(AND(AND($N$2>=181,$N$2<=359),(AND(E2>=181,E2<=359))))),"SAME",IF(OR(OR($N$2=0,$N$2=180),(OR((E2=0),(E2=180)))),"VER","")))"
I was wondering if anyone could help me? Would really appreciate it.
Thanks