I think that the way VLookup works -- only finds the first
You can try .Find or .Filter if you want them all
Something like this
Option Explicit
Sub drv()
Dim r As Range
Set r = FilteredData(ActiveSheet.Cells(1, 1).CurrentRegion, 1, "AAA")
If Not r Is Nothing Then r.Interior.Color = vbRed
Set r = FilteredData(ActiveSheet.Cells(1, 1).CurrentRegion, 1, "ddd")
If Not r Is Nothing Then r.Interior.Color = vbGreen
End Sub
Function FilteredData(r As Range, c As Long, v As Variant) As Range
On Error GoTo NiceExit
With r
If .Parent.FilterMode Then .AutoFilter
.AutoFilter
.AutoFilter Field:=c, Criteria1:=v
'hide header row
.Rows(1).EntireRow.Hidden = True
Set FilteredData = r.SpecialCells(xlCellTypeVisible)
.Rows(1).EntireRow.Hidden = False
.AutoFilter
End With
Exit Function
NiceExit:
Set FilteredData = Nothing
End Function