Thema Datum  Von Nutzer Rating
Antwort
09.01.2016 13:54:13 Matthias
NotSolved
09.01.2016 15:17:51 Gast23553
NotSolved
09.01.2016 19:35:30 Matthias
NotSolved
10.01.2016 15:10:50 Matthias
NotSolved
10.01.2016 17:06:45 Matthias
NotSolved
10.01.2016 18:07:08 Gast47001
NotSolved
10.01.2016 18:16:23 Matthias
NotSolved
10.01.2016 19:18:07 Gast78858
NotSolved
10.01.2016 19:44:03 Matthias
NotSolved
10.01.2016 20:37:49 Gast75511
NotSolved
10.01.2016 22:20:14 Peter
NotSolved
10.01.2016 22:53:57 Gast93497
NotSolved
11.01.2016 18:34:16 Matthias
NotSolved
Blau Daten auf einzelne Sheets aufteilen
11.01.2016 20:58:11 Gast24821
NotSolved
12.01.2016 19:03:51 Matthias
NotSolved
12.01.2016 20:46:37 Matthias
NotSolved
16.01.2016 10:28:33 Matthias
NotSolved
16.01.2016 11:35:23 Gast7340
NotSolved
16.01.2016 13:43:18 Matthias
NotSolved
16.01.2016 20:27:06 Gast59546
NotSolved
16.01.2016 20:43:49 Matthias
NotSolved
16.01.2016 23:05:06 Gast27892
NotSolved
17.01.2016 10:36:14 Matthias
NotSolved
17.01.2016 12:34:32 Matthias
NotSolved
17.01.2016 13:21:30 Gast21379
NotSolved
17.01.2016 14:17:36 Matthias
NotSolved
17.01.2016 14:51:02 Gast31799
NotSolved
17.01.2016 15:38:49 Matthias
NotSolved
17.01.2016 17:43:45 Gast59516
NotSolved
17.01.2016 18:06:12 Gast90961
NotSolved
17.01.2016 18:30:40 Gast8489
NotSolved
17.01.2016 18:48:34 Matthias
Solved
17.01.2016 19:11:44 Gast41059
NotSolved

Ansicht des Beitrags:
Von:
Gast24821
Datum:
11.01.2016 20:58:11
Views:
743
Rating: Antwort:
  Ja
Thema:
Daten auf einzelne Sheets aufteilen

hi MATTHIAS,

mal zum Testen - etwas umständlich und ohne Fehlerbehandlung

'***************************************
' Quelltabellenname ANPASSEN!
Const QUELLE As String = "Lager gesamt"
'***************************************

Option Explicit

Sub Test()
'***************************************
' Quelltabellenname ANPASSEN!
Const QUELLE As String = "Lager gesamt"
'***************************************
Dim RngAD As Range
Dim arrAD() As Variant
Dim i As Integer
'
Dim oWsh As Excel.Worksheet
Dim oWs As Excel.Worksheet
'
Dim RngDest As Range
'

'wegen Test
Application.DisplayAlerts = False
Application.ScreenUpdating = False
For Each oWsh In ThisWorkbook.Sheets
   If oWsh.Name <> QUELLE Then oWsh.Delete
Next oWsh

'Testende
'
With Sheets(QUELLE)
   Set RngAD = .UsedRange
   Set RngAD = Range(RngAD.Columns(1), RngAD.Columns(4))
   arrAD = RngAD
End With
'
   For i = 10 To 22
      Set oWsh = Worksheets.Add(After:=Sheets(Sheets.Count))
      Sheets(QUELLE).Columns(i).Copy ActiveSheet.Cells(1, 5)
      Sheets(QUELLE).Columns(23).Copy ActiveSheet.Cells(1, 6)
      '
      Set oWs = Worksheets.Add(After:=Sheets(Sheets.Count))
   '
      With oWsh
         '.Activate
         With .Cells(1, 5).CurrentRegion
            .AutoFilter Field:=2, Criteria1:="=A", Operator:=xlOr, Criteria2:="=B"
            .SpecialCells(xlCellTypeVisible).Copy oWs.Cells(1, 5)
            '.AutoFilter
         End With
         .Delete
      End With
      With oWs
         '.Activate
         .Name = Cells(1, 5).Value
         Set RngDest = .Range("A1")
         RngDest.Resize(UBound(arrAD, 1), UBound(arrAD, 2)).Value = arrAD
         '
      End With
 '
   Next i
'
'
   For i = 19 To 22
      Set oWsh = Worksheets.Add(After:=Sheets(Sheets.Count))
      Sheets(QUELLE).Columns(i).Copy ActiveSheet.Cells(1, 5)
      Sheets(QUELLE).Columns(23).Copy ActiveSheet.Cells(1, 6)
      '
      Set oWs = Worksheets.Add(After:=Sheets(Sheets.Count))
   '
      With oWsh
         '.Activate
         With .Cells(1, 5).CurrentRegion
            .AutoFilter Field:=2, Criteria1:="=C"
            .SpecialCells(xlCellTypeVisible).Copy oWs.Cells(1, 5)
            '.AutoFilter
         End With
         .Delete
      End With
      With oWs
         '.Activate
         .Name = Cells(1, 5).Value & "C"
         Set RngDest = .Range("A1")
         RngDest.Resize(UBound(arrAD, 1), UBound(arrAD, 2)).Value = arrAD
         '
      End With
 '
   Next i
'
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub

 


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
09.01.2016 13:54:13 Matthias
NotSolved
09.01.2016 15:17:51 Gast23553
NotSolved
09.01.2016 19:35:30 Matthias
NotSolved
10.01.2016 15:10:50 Matthias
NotSolved
10.01.2016 17:06:45 Matthias
NotSolved
10.01.2016 18:07:08 Gast47001
NotSolved
10.01.2016 18:16:23 Matthias
NotSolved
10.01.2016 19:18:07 Gast78858
NotSolved
10.01.2016 19:44:03 Matthias
NotSolved
10.01.2016 20:37:49 Gast75511
NotSolved
10.01.2016 22:20:14 Peter
NotSolved
10.01.2016 22:53:57 Gast93497
NotSolved
11.01.2016 18:34:16 Matthias
NotSolved
Blau Daten auf einzelne Sheets aufteilen
11.01.2016 20:58:11 Gast24821
NotSolved
12.01.2016 19:03:51 Matthias
NotSolved
12.01.2016 20:46:37 Matthias
NotSolved
16.01.2016 10:28:33 Matthias
NotSolved
16.01.2016 11:35:23 Gast7340
NotSolved
16.01.2016 13:43:18 Matthias
NotSolved
16.01.2016 20:27:06 Gast59546
NotSolved
16.01.2016 20:43:49 Matthias
NotSolved
16.01.2016 23:05:06 Gast27892
NotSolved
17.01.2016 10:36:14 Matthias
NotSolved
17.01.2016 12:34:32 Matthias
NotSolved
17.01.2016 13:21:30 Gast21379
NotSolved
17.01.2016 14:17:36 Matthias
NotSolved
17.01.2016 14:51:02 Gast31799
NotSolved
17.01.2016 15:38:49 Matthias
NotSolved
17.01.2016 17:43:45 Gast59516
NotSolved
17.01.2016 18:06:12 Gast90961
NotSolved
17.01.2016 18:30:40 Gast8489
NotSolved
17.01.2016 18:48:34 Matthias
Solved
17.01.2016 19:11:44 Gast41059
NotSolved