Hallo,
wenn's so einfach wäre, hättest Du' s Dir wohl schon selbst beantwortet....
Option Explicit
Public Sub test()
Dim objRange As Range
Dim avntAlphaNum() As Variant
Dim avntArray As Variant
Dim ialngIndex As Long, ialngCount As Long
With ActiveSheet
avntArray = .Cells(1, 1).Resize(.Cells(.Rows.Count, 1).End(xlUp).Row, 1)
For ialngIndex = 1 To UBound(avntArray, 1)
Set objRange = .Cells(1, 2).Resize(.Cells(.Rows.Count, 2).End(xlUp).Row, 2).Find( _
What:=avntArray(ialngIndex, 1), LookIn:=xlValues, LookAt:=xlWhole)
If Not objRange Is Nothing Then
ialngCount = ialngCount + 1
ReDim Preserve avntAlphaNum(0, ialngCount - 1) As Variant
avntAlphaNum(0, ialngCount - 1) = objRange
End If
Next
.Cells(1, 3).Resize(UBound(avntAlphaNum, 2) + 1, 1) = WorksheetFunction.Transpose(avntAlphaNum)
End With
Set objRange = Nothing
End Sub
Gruß,
|