Hi
I am trying to split a long line of code into multiple line, I have entered space then under score and hit carrage return but keep getting error message compile error: expected end of statement. could someone explain what I am doing wrong.
See code with split entered giving error message
coop123
I am trying to split a long line of code into multiple line, I have entered space then under score and hit carrage return but keep getting error message compile error: expected end of statement. could someone explain what I am doing wrong.
ActiveCell.FormulaR1C1 = _
"=IF(RC[-3]=1201,""MWO GEN"",IF(RC[-3]=1202,""PROD GEN"",IF(RC[-3]=1203,""INC INSP"",IF(RC[-3]=1221,""MWO PROD"",IF(RC[-3]=3011,""PURCH"",IF(RC[-3]=3041,""MAINT"",IF(RC[-3]=3201,""ENG"",IF(RC[-3]=5000,""MD OFFICE"",IF(RC[-3]=5011,""MD OFFICE"",IF(RC[-3]=5042,""QC"",IF(RC[-3]=5051,""FINANCE"",IF(RC[-3]=5052,""HR"",IF(RC[-3]=5053,""EDP"",IF(RC[-3]=5054,""EDP""))))))))))))))"
See code with split entered giving error message
Thanks for any assistanceActiveCell.FormulaR1C1 = _
"=IF(RC[-3]=1201,""MWO GEN"",IF(RC[-3]=1202,""PROD GEN"", _
IF(RC[-3]=1203,""INC INSP"",IF(RC[-3]=1221,""MWO PROD"",IF(RC[-3]=3011,""PURCH"",IF(RC[-3]=3041,""MAINT"",IF(RC[-3]=3201,""ENG"",IF(RC[-3]=5000,""MD OFFICE"",IF(RC[-3]=5011,""MD OFFICE"",IF(RC[-3]=5042,""QC"",IF(RC[-3]=5051,""FINANCE"",IF(RC[-3]=5052,""HR"",IF(RC[-3]=5053,""EDP"",IF(RC[-3]=5054,""EDP""))))))))))))))"
coop123