Option Explicit
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Application.EnableEvents = False
Dim ws1 As Worksheet, ws2 As Worksheet
Dim strKunde As String, strKnr As String
Set ws1 = ThisWorkbook.ActiveSheet
Set ws2 = ThisWorkbook.Worksheets("2009")
If Target.Row < 9 Or Target.Column <> 15 Then Exit Sub
strKnr = ws1.Range("M3").Value
strKunde = ws1.Range("M4").Value
If UCase(Target.Value) = "X" Then
ws2.Cells(ws2.Cells(Rows.Count, 1).End(xlUp).Row + 1, 1).Value = strKnr
ws2.Cells(ws2.Cells(Rows.Count, 1).End(xlUp).Row, 2).Value = strKunde
ws1.Range("A" & ws1.Cells(Rows.Count, 1).End(xlUp).Row & ":N" & ws1.Cells(Rows.Count, 1).End(xlUp).Row).Copy
Sheets("2009").Range("C" & ws2.Cells(Rows.Count, 1).End(xlUp).Row).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone
Application.CutCopyMode = False
End If
Application.EnableEvents = True
End SubOption Explicit
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim ws1 As Worksheet, ws2 As Worksheet
Dim strKunde As String, strKnr As String
Set ws1 = ThisWorkbook.ActiveSheet
Set ws2 = ThisWorkbook.Worksheets("2009")
If Target.Row < 9 Or Target.Column <> 15 Then Exit Sub
Application.EnableEvents = False
strKnr = ws1.Range("M3").Value
strKunde = ws1.Range("M4").Value
If UCase(Target.Value) = "X" Then
ws2.Cells(ws2.Cells(Rows.Count, 1).End(xlUp).Row + 1, 1).Value = strKnr
ws2.Cells(ws2.Cells(Rows.Count, 1).End(xlUp).Row, 2).Value = strKunde
ws1.Range("A" & Target.Row & ":N" & Target.Row).Copy
Sheets("2009").Select
Range("C" & ws2.Cells(Rows.Count, 1).End(xlUp).Row).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone
Application.CutCopyMode = False
Range("A5").Select
End If
Application.EnableEvents = True
End Sub
Daten aus anderen Blättern holen
rodster 17.10.2007 - 103 Hits - 6 Antworten
Worksheet_Change wenn die Zellen per Formel Daten aus einem anderen Blatt holen?
Thokolue 16.01.2008 - 15 Hits - 1 Antwort
Formel für Suche in verschiedenen Tabellenblättern
smokie 26.03.2008 - 26 Hits - 3 Antworten
nur bestimmte Daten eines Tabellenblattes in ein anderes Blatt übernehmen
Petra65 16.09.2008 - 180 Hits - 4 Antworten
Daten auf anderes Blatt verschieben
Ulle-gt5 26.02.2009 - 187 Hits - 22 Antworten