hieronder gedeelte van script en de excel.
in tabblad "info" in de kolom "beschikbare chauffeurs" ontbreekt 1 naam "Verbaarschot Willem" kan niet vinden waarom hij er niet komt bij te staan, al de rest gaat goed...
in tabblad "info" in de kolom "beschikbare chauffeurs" ontbreekt 1 naam "Verbaarschot Willem" kan niet vinden waarom hij er niet komt bij te staan, al de rest gaat goed...
Code:
'bepalen van beschikbare chauffeurs
sv = Sheets("data").Cells(2, 1).CurrentRegion
c00 = Join((Application.Transpose(Sheets("chauffeurs").Range("A2:A293"))), "$")
Dim c01(500)
Dim c02(500)
datum = Sheets("info").Cells(1, 4)
For b = 2 To UBound(sv)
If sv(b, 22) = datum And InStr(c00, sv(b, 13)) Then c00 = Replace(c00, sv(b, 13) & "$", "$")
Next b
For zzz = 1 To UBound(Split(c00, "$"))
If Split(c00, "$")(zzz) <> "" And InStr(Split(c00, "$")(zzz), "E") Then
c01(zzt) = Split(c00, "$")(zzz)
zzt = zzt + 1
End If
Next zzz
' Find the last non-blank cell in column A(1)
mRow = Sheets("chauffeurs").Cells(Rows.Count, 1).End(xlUp).Row
For iii = 0 To UBound(c01()) - 1
For yyy = 1 To mRow
If c01(iii) = Sheets("chauffeurs").Cells(yyy, 1).Value Then
c02(iii) = Sheets("chauffeurs").Cells(yyy, 6).Value
Exit For
End If
Next yyy
Next iii
Sheets("info").Cells(90, 4).Resize(UBound(c02()) + 1) = Application.Transpose(c02())
End sub