beste helpers
ik heb weer eens een vraag
in vba heb ik nu 4 regels nodig om te zoeken met xlookup
ik probeer het in 1 regel te krijgen wat mij niet wil lukken wie kan mij hiermee helpen (hier zit ik vast)
don
ik heb weer eens een vraag
in vba heb ik nu 4 regels nodig om te zoeken met xlookup
Code:
Private Sub CommandButton3_Click()
Dim lastrow, at, x, o As String
lastrow = Sheets("Lotto-Leden").Range("ao" & Rows.Count).End(xlUp).Row
x = 3
For at = 3 To lastrow
If Range("aq" & x) = "" Or Range("aq" & x) = "Totaal" Then
Else
Range("at" & x) = Application.WorksheetFunction.XLookup(Range("aq" & x).Value, Range("ah:ah"), Range("ai:ai"))
Range("au" & x) = Application.WorksheetFunction.XLookup(Range("aq" & x).Value, Range("ah:ah"), Range("aj:aj"))
Range("av" & x) = Application.WorksheetFunction.XLookup(Range("aq" & x).Value, Range("ah:ah"), Range("ak:ak"))
Range("aw" & x) = Application.WorksheetFunction.XLookup(Range("aq" & x).Value, Range("ah:ah"), Range("al:al"))
x = x + 1
End If
Next
End Sub
ik probeer het in 1 regel te krijgen wat mij niet wil lukken wie kan mij hiermee helpen (hier zit ik vast)
Code:
Range("aw" & x) = Application.WorksheetFunction.XLookup(Range("aq" & x).Value, Range("ah:ah"), [COLOR="#FF0000"]Range("ai3:aL96"))[/COLOR]
don