ich brauche mal wieder Hilfe bei einer Formel.
Das Problem habe ich in einer Beispielmappe beschrieben!
https://www.herber.de/bbs/user/50231.xls
Danke schon mal für die Hilfe
Gruß Dieter
Public Sub Tabelle_erstellen()
Dim i%, s%, bl%, lz%, z%, summe%, lzT%
lzT = Cells(1000, 1).End(xlUp).Row
Range("c5:l" & lzT).ClearContents
On Error GoTo ende
Application.ScreenUpdating = False
For i = 5 To lzT
For s = 3 To 12
For bl = 1 To Worksheets.Count - 1
With Sheets(bl)
lz = .Cells(100, 15).End(xlUp).Row
For z = 5 To lz
If Cells(i, 1).Value = .Cells(z, 15).Value Then
summe = summe + .Cells(z, s + 14).Value
End If
Next
End With
Next
Cells(i, s).Value = summe
summe = 0
Next
Next
ende:
Application.ScreenUpdating = True
End Sub
gruß Herbert
Die Datei https://www.herber.de/bbs/user/50240.xls wurde aus Datenschutzgründen gelöscht
Public Sub Tabelle_erstellen()
Dim i%, s%, bl%, lz%, z%, summe%, lzT%, x%, y%
lzT = Cells(1000, 2).End(xlUp).Row
Range("d7:aw" & lzT).ClearContents
On Error GoTo ende
Application.ScreenUpdating = False
With frm1
.Show
.Prog1.Max = lzT - 7
DoEvents
For i = 7 To lzT
.Prog1.Value = x
x = x + 1
.Prog2.Max = 45
For s = 4 To 49
.Prog2.Value = y
y = y + 1
For bl = 1 To Worksheets.Count - 1
With Sheets(bl)
lz = .Cells(100, 60).End(xlUp).Row
For z = 7 To lz
If Cells(i, 2).Value = .Cells(z, 60).Value Then
summe = summe + .Cells(z, s + 58).Value
End If
Next
End With
Next
Cells(i, s).Value = summe
summe = 0
Next
y = 0
Next
End With
Unload frm1
ende:
Application.ScreenUpdating = True
End Sub
gruß Herbert
https://www.herber.de/bbs/user/50249.xls