Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.
Sub findData() Dim f As Range, fa As String, i As Long, r As Range, ws As Worksheet Dim src As Worksheet, dst As Worksheet Set src = Sheets("sheet2") 'sheet to be searched, change as required i = 1 For Each r In Sheets("Sheet3").Range("A1", Sheets("Sheet3").Range("A" & Rows.Count).End(xlUp)) Set f = src.Cells.Find(What:=r.Value, after:=src.Cells(1), LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False) If Not f Is Nothing Then Set ws = Sheets.Add(after:=Sheets(Sheets.Count)) ws.Name = r fa = f.Address Do If Len(f.Value) < 80 Then ws.Range("A" & Rows.Count).End(xlUp)(2) = f.Value i = i + 1 End If Set f = src.Cells.FindNext(f) Loop Until fa = f.Address End If fa = "" Next r End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.