Re: Formel kopieren per Makro
23.04.2003 14:58:01
Jutta
Hallo Moe,stimmt.Ich ich habe es im kleinen in einer anderen Datei probiert.
Der ganze Code ist so:
Sub FBEZ_aufbereiten()
Application.ScreenUpdating = False
'Spalten einfügen
Columns("B:B").Select
Selection.Insert Shift:=xlToRight
Columns("B:B").Select
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
'Text in Spalten
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="0", FieldInfo:=Array(1, 1)
Range("E1").Select
'getrennte FBEZ verbinden
ActiveCell.FormulaR1C1 = "=RC[-4]&RC[-3]&RC[-2]&RC[-1]"
Range("E1").Select
'Formel kopieren
Selection.Copy
Range("E2:E1900").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("E1").Select
Application.Selection = True
End Sub
Gruß
Jutta