Comparision between two data sets

  • Comparision between two data sets using FIND Function
  • Sub Comparision_Between_Two_Columns()

    Dim Sh As Worksheet
    Set Sh = ThisWorkbook.Sheets("V-Lookup")

    Max = Sh.Range("A" & Rows.Count).End(xlUp).Row

    For i = 2 To Max
    Set v = Sh.Range("B2:B" & Max).Find(what:=Sh.Cells(i, 1).Value, LookIn:=xlValues)
    If Not v Is Nothing Then
    v.Select
    r = ActiveCell.Row
    Cells(r, 3).Value = Cells(i, 1).Row

    ElseIf v Is Nothing Then
    Cells(i, 3).Value = "Data Not Available"

    End If
    Next
    End Sub

     

    Download The Workbook