我有以下公式,如果我在 Excel 中输入,它可以完美运行,但是当打开宏时它会给我一个错误,它会突出显示FRANCE。
预期编译错误:语句结束
我真的很困惑,我不知道我做错了什么。任何人都可以看看这个。
ActiveCell.FormulaR1C1 = "=IF(LEFT(R[-1]C[1],6)=""AT_COM"",""AUSTRIA"",IF(LEFT(R[-1]C[1],6)=""BE_COM"",""BELUX"",IF(LEFT(R[-1]C[1],6)=""CP_COM"",""CZECH"",IF(LEFT(R[-1]C[1],6)=""CZ_COM"",""CZECH"",IF(LEFT(R[-1]C[1],6)=""DK_COM"",""DENMARK"",IF(LEFT(R[-1]C[1],6)=""FI_COM"",""FINLAND"",IF(LEFT(R[-1]C[1],6)=""FR_COM""," & _
""**FRANCE**"",IF(LEFT(R[-1]C[1],6)=""DE_COM"",""GERMANY"",IF(LEFT(R[-1]C[1],6)=""GR_COM"",""GREECE"",IF(LEFT(R[-1]C[1],6)=""IL_COM"",""ISRAEL"",IF(LEFT(R[-1]C[1],6)=""IT_COM"",""ITALY"",IF(LEFT(R[-1]C[1],6)=""ME_COM"",""MIDDLE EAST"",IF(LEFT(R[-1]C[1],6)=""NL_COM"",""NETHERLANDS"",IF(LEFT(R[-1]C[1],6)=""NO_COM"",""NORWAY"",IF(LEFT(R[-1]C[1],6)=""PL_COM"",""POLAND"",IF(LEFT(R[-1]C[1],6)=""PT_COM"",""PORTUGAL"",IF(LEFT(R[-1]C[1],6)=""RU_RUSSIA"",""RUSSIA"",IF(LEFT(R[-1]C[1],6)=""RU_ENT"",""RUSSIA"",IF(LEFT(R[-1]C[1],6)=""SEE_CO"",""SEE"",IF(LEFT(R[-1]C[1],6)=""ES_COM"",""SPAIN"",IF(LEFT(R[-1]C[1],6)=""SA_COM"",""SOUTH AFRICA"",IF(LEFT(R[-1]C[1],6)=""SE_COM"",""SWEDEN"",IF(LEFT(R[-1]C[1],6)=""CH_COM"",""SWITZERLAND"",IF(LEFT(R[-1]C[1],6)=""TR_COM"",""TURKEY"",IF(LEFT(R[-1]C[1],6)=""UK_COM"",""UK"",IF(LEFT(R[-1]C[1],6)=""UK_ENT"",""UK PS"",""UNKNOWN""))))))))))))))))))))))))))"