Sub Zeilen_auslesen()
'** auslesen der Zeilen mit Text "CPU %" in Spalte B
Dim z As Long 'Startzeile
Set wsakt = ThisWorkbook.Sheets(1)
z = 9
wsakt.Range("H9:M50000").ClearContents
For a = 1 To wsakt.Cells(Rows.Count, 1).End(xlUp).Row
If wsakt.Cells(a, 2).Value = "CPU %" Then
b = a + 1
Do While wsakt.Cells(b, 1).Value <> ""
With wsakt
.Cells(z, 8).Value = .Cells(b, 1).Value 'Time
.Cells(z, 9).Value = .Cells(b, 2).Value 'CPU%
.Cells(z, 10).Value = .Cells(b, 3).Value 'Data %
.Cells(z, 11).Value = .Cells(b, 4).Value 'Ctrl
.Cells(z, 12).Value = .Cells(b, 5).Value 'Serial
.Cells(z, 13).Value = .Cells(b, 6).Value 'Node
End With
b = b + 1
z = z + 1
Loop
End If
Next a
End Sub