ich moechte ein Makro erstellen, dass eine Formel in die Zelle A2 einfuegt. Aktuell sieht der Code wie folgt aus:
Range("A2").Select
ActiveCell.FormulaR1C1 = _
"=IF(LEFT(B2,3)="CLA", "CLA", IF(LEFT(B2,1)="C", "C", IF(LEFT(B2,1)="E", "E", IF(LEFT(B2,3)="GLA", "GLA", IF(LEFT(B2,3)="GLC", "GLC", IF(LEFT(B2,3)="GLE", "GLE", IF(LEFT(B2,3)="GLK", "GLK", IF(LEFT(B2,3)="GLS", "GLS", IF(LEFT(B2,2)="GL", "GL", IF(LEFT(B2,1)="G", "G", IF(LEFT(B2,2)="ML", "ML", IF(LEFT(B2,2)="MM", "MM", IF(LEFT(B2,1)="M", "M", IF(LEFT(B2,3)="SLC", "SLC", IF(LEFT(B2,3)="SLK", "SLK", IF(LEFT(B2,5)="SMART", "SMART", IF(LEFT(B2,2)="SL", "SL", IF(LEFT(B2,1)="S", "S", "?"))))))))))))))))))"
Es tritt jedoch der Fehler "Compile Error: expected end of statement" auf. Und CLA wird markiert.
Hat jemand eine Loesung? VIELEN DANK