Try this.
Sub zoek_gebuiker()
Dim c As Range, firstaddress As String, c1 As Range, c2 As Range, v
Application.ScreenUpdating = False
With Blad1.Range("B1", Blad1.Range("B" & Rows.Count).End(xlUp))
Set c = .Find(What:="Medewerker:", Lookat:=xlWhole, MatchCase:=False, SearchFormat:=False)
If Not c Is Nothing Then
firstaddress = c.Address
Do
c.Offset(0, 1).Copy
uitvoerBlad.Range("C" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Set c1 = .Find(What:="Conversie", After:=c, Lookat:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
Set c2 = Blad1.Cells.Find(What:="Totaal", After:=c, Lookat:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
If Not c1 Is Nothing And Not c2 Is Nothing Then
Blad1.Cells(c1.Row, c2.Column).Copy
uitvoerBlad.Range("E" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValuesAndNumberFormats
Blad1.Cells(c1.Row + 1, c2.Column).Copy
uitvoerBlad.Range("F" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValuesAndNumberFormats
End If
v = Application.Match(c.Offset(, 1), uitvoerBlad.Columns("K:K"), 0)
If IsNumeric(v) Then
uitvoerBlad.Range("D" & Rows.Count).End(xlUp).Offset(1, 0).Value = Application.Index(uitvoerBlad.Columns("L:L"), v, 1)
End If
Set c = .Find(What:="Medewerker:", After:=c1, Lookat:=xlWhole, MatchCase:=False, SearchFormat:=False)
Loop While c.Address <> firstaddress
End If
End With
Application.ScreenUpdating = True
End Sub
Bookmarks