Makro-Aufzeichnung

05/10/2008 - 15:53 von Gerd Zollmann | Report spam
Hallo,

ich hangele mich ein bischen durch excel-makros und es klappt auch
einigermaßen.
Aber wenn ich mir beigefügtes Makro anschaue, bin ich der Ansicht, dass es
sicher
von Experten Ruckzuck in ein schnelleres VBA-Modul verwandelt wird.
Es wird im Prinziep 15mal dasselbe gemacht, die nàchste Reihe kopiert und
das
Ergebnis ebenfalls immer eine Reihe weiter kopiert.
Ich bin neugierig auf die Lösung.

Viele Grüsse Gerd

Anhang:

Sub Vtesten()
'
' Vtesten Makro
' Makro am 03.10.2008 von Gerd32 aufgezeichnet
'
' Tastenkombination: Strg+t
'
Range("Z14:AE14").Select
Application.CutCopyMode = False
Selection.Copy
Range("G7").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AA10:AC10").Select
Selection.Copy
Range("AA38").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("Z15:AE15").Select
Application.CutCopyMode = False
Selection.Copy
Range("G7").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AA10:AC10").Select
Selection.Copy
Range("AA39").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("Z16:AE16").Select
Application.CutCopyMode = False
Selection.Copy
Range("G7").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AA10:AC10").Select
Selection.Copy
Range("AA40").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("Z17:AE17").Select
Application.CutCopyMode = False
Selection.Copy
Range("G7").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AA10:AC10").Select
Selection.Copy
Range("AA41").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("Z18:AE18").Select
Application.CutCopyMode = False
Selection.Copy
Range("G7").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AA10:AC10").Select
Selection.Copy
Range("AA42").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("Z19:AE19").Select
Application.CutCopyMode = False
Selection.Copy
Range("G7").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AA10:AC10").Select
Selection.Copy
Range("AA43").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("Z20:AE20").Select
Application.CutCopyMode = False
Selection.Copy
Range("G7").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AA10:AC10").Select
Selection.Copy
Range("AA44").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("Z21:AE21").Select
Application.CutCopyMode = False
Selection.Copy
Range("G7").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AA10:AC10").Select
Selection.Copy
Range("AA45").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("Z22:AE22").Select
Application.CutCopyMode = False
Selection.Copy
Range("G7").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AA10:AC10").Select
Selection.Copy
Range("AA46").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("Z23:AE23").Select
Application.CutCopyMode = False
Selection.Copy
Range("G7").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AA10:AC10").Select
Selection.Copy
Range("AA47").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("Z24:AE24").Select
Application.CutCopyMode = False
Selection.Copy
Range("G7").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AA10:AC10").Select
Selection.Copy
Range("AA48").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("Z25:AE25").Select
Application.CutCopyMode = False
Selection.Copy
Range("G7").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AA10:AC10").Select
Selection.Copy
Range("AA49").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("Z26:AE26").Select
Application.CutCopyMode = False
Selection.Copy
Range("G7").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AA10:AC10").Select
Selection.Copy
Range("AA50").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("Z27:AE27").Select
Application.CutCopyMode = False
Selection.Copy
Range("G7").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AA10:AC10").Select
Selection.Copy
Range("AA51").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("Z28:AE28").Select
Application.CutCopyMode = False
Selection.Copy
Range("G7").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AA10:AC10").Select
Selection.Copy
Range("AA52").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("Z29:AE29").Select
Application.CutCopyMode = False
Selection.Copy
Range("G7").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AA10:AC10").Select
Selection.Copy
Range("AA53").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("Z30:AE30").Select
Application.CutCopyMode = False
Selection.Copy
Range("G7").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AA10:AC10").Select
Selection.Copy
Range("AA54").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("Z31:AE31").Select
Application.CutCopyMode = False
Selection.Copy
Range("G7").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AA10:AC10").Select
Selection.Copy
Range("AA55").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("Z32:AE32").Select
Selection.Copy
Range("G7").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AA10:AC10").Select
Selection.Copy
Range("AA56").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("Z33:AE33").Select
Application.CutCopyMode = False
Selection.Copy
Range("G7").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AA10:AC10").Select
Selection.Copy
Range("AA57").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("Z34:AE34").Select
Application.CutCopyMode = False
Selection.Copy
Range("G7").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AA10:AC10").Select
Selection.Copy
Range("AA58").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("Z35:AE35").Select
Application.CutCopyMode = False
Selection.Copy
Range("G7").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AA10:AC10").Select
Selection.Copy
Range("AA59").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("AC38:AC59").Select
Application.CutCopyMode = False
Selection.NumberFormat = "#,##0.00"
Range("AC54").Select
Selection.Copy
Range("AC55").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
End Sub
 

Lesen sie die antworten

#1 Claus Busch
05/10/2008 - 16:13 | Warnen spam
Hallo Gerd,

kannst du mal erklàren was du hier machen willst?
Du kopierst einen Range zeilenweise immer wieder in die gleiche Zelle.
Dann hast du am Schluss doch nur die letzte kopierte Zeile dort drin
stehen?
Im anderen Fall kopierst du stàndig den gleichen Range und kopierst in
in mehrere Zeilen untereinander. Warum?


Mit freundlichen Grüssen
Claus Busch
Win XP Prof SP2 / Vista Ultimate
Office 2003 SP2 / 2007 Ultimate

Ähnliche fragen