Hi I am new to Excel VBA (2010).
Why am I getting this error on this part of my Sub?
ActiveCell.FormulaR1C1 = _
"=IF(AND(RC[-1]=""Heavy Oil"",RC[-20]=""HZ""),""Heavy Oil Hz"",IF(AND(RC[-1]=""Heavy Oil"",OR(RC[-20]=""VERT"",RC[-20]=""DIRE"",RC[-20]=""VERT"",RC[-20]=""SL"")),""Heavy Oil Slant + Vert"",IF(AND(RC[-1]=""SE SK"",RC[-20]=""HZ""),""SE SK Hz"",IF(AND(RC[-1]=""SE SK"",OR(RC[-20]=""Hz"",RC[-20]=""SL"",RC[-20]=""Vert"",RC[-20]=""Dire"")),""SE SK Slant, Vert, Dire"",IF(AND (RC[-1]=""NCAB"",RC[-20]=""HZ""),""NCAB Hz"",IF(AND(RC[-1]=""NCAB"",OR(RC[-20]=""SL"",RC[-20]=""Vert"",RC[-20]=""Dire"")),""NCAB Slant, Vert, Dire"",IF(AND(RC[-1]=""SCAB"",RC[-20]=""Hz""),""SCAB Hz"",IF(AND(RC[-1]=""SCAB"",OR(RC[-20]=""SL"",RC[-20]=""Vert"",RC[-20]=""Dire"")),""SCAB Slant, Vert, Dire"",IF(AND(RC[-1]=""GP"",RC[-20]=""Hz""),""GP Hz"",IF(AND(RC[-1]=""GP""," & _
"OR(RC[-20]=""SL"",RC[-20]=""Vert"",RC[-20]=""Dire"")),""GP Slant, Vert, Dire"",IF(OR(RC[-1]=""Thermal"",RC[-20]=""Brintnell"",RC[-1]=""Wabiskaw Slant / Vertical"",RC[-1]=""Edson Deep Basin North"",RC[-1]=""Edson Deep Basin South""),RC[-1],IF(AND(RC[-1]=""BC"",RC[-20]=""Hz"",OR(RC[-2]=""Septimus"",RC[-2]=""Birch"")),""BC Conv Gas: Septimus, Birch Hz"",IF(RC[-1]=""BC"",""BC Conv Gas & Oil"","""")))))))))))))"
I am adehering to the rules of:
..." & _
"..........
as well as the ""double quotation""
Thanks for your help!
Bookmarks