How can i make this code faster and more efficient. I found several example in here, some one suggest to use variant and use UBound and LBound. I used it but still same thing. It's taking more then 5mins to loop through one million rows. What I am doing in here, Finding names then go to corresponding column to get the number. Then search for the number in A column, if i find the number then go corresponding column, copy and paste in different worksheet.  Dim wsheet1 as Worksheet, wsheet2 as Worksheet, lastrow as long, correspondingValue1 as Object, correspondingOffset as Object, searchNum as Object, data1, data1Range as Range, x as Long, y as Long   Set wsheet1 = ActiveWorkbook.Worksheets(Sheet1)   Set wsheet2 = ActiveWorkbook.Worksheets(Sheet2)   Set data1Range =  wsheet2.Range(wsheet2.Range(C1), wsheet2.Cells(Rows.Count, 1).End(xlUp))   data1 = data1Range.Value       For i = 1 To UBound(data1, 1)            If wsheet2.Cells(i, 3).Value = Mike Or wsheet2.Cells(i, 3) = Sam Or wsheet2.Cells(i, 3) = George Or wsheet2.Cells(i, 3) = Abrahim Then              Set correspondingValue1 = wsheet2.Cells(i, 3)              Set correspondingOffset = corespondingValue1.Offset(columnoffset:=7)                If InStr(1, xoffset, 1.) <> 0 Then                    With wsheet2.Range(a1:a & lastrow)                    Set searchNum = .Find(wsheet2.Range(J & i).Value, LookIn:=xlValues)               If Not searchNum Is Nothing Then                    firstAddress = searchNum.Address                  Do                     searchNum.Offset(columnoffset:=3).Copy                       wsheet1.Range(B & x).PasteSpecial                  Loop While Not searchNum Is Nothing And searchNum.Address <> firstAddress             x = x + 1            End If        End With    End If    End If
How can I make loop faster and more efficient in VBA?
vba