TDK1966
08-17-2010, 01:40 PM
I have this code that works great. what I need to do is make this find copy to the next available row. I'd thank you immensely if you can help me with this. Might even come over and do your dishes for you for a week TEE HEE
Will
Sub Find()
Dim intS As Integer
Dim rngC As Range
Dim strToFind As String, FirstAddress As String
Dim wSht As Worksheet
Application.ScreenUpdating = False
intS = 3
Set wSht = Worksheets("Searched_Data")
strToFind = InputBox("Enter the search term you're looking for")
If strToFind = vbNullString Then Exit Sub
With ActiveSheet.Range("A4:L65536")
Set rngC = .Find(What:=strToFind, LookAt:=xlPart)
If Not rngC Is Nothing Then
FirstAddress = rngC.Address
Do
rngC.EntireRow.copy wSht.Cells(intS, 1)
intS = intS + 1
Set rngC = .FindNext(rngC)
Loop While Not rngC Is Nothing And rngC.Address <> FirstAddress
End If
End With
End Sub
Will
Sub Find()
Dim intS As Integer
Dim rngC As Range
Dim strToFind As String, FirstAddress As String
Dim wSht As Worksheet
Application.ScreenUpdating = False
intS = 3
Set wSht = Worksheets("Searched_Data")
strToFind = InputBox("Enter the search term you're looking for")
If strToFind = vbNullString Then Exit Sub
With ActiveSheet.Range("A4:L65536")
Set rngC = .Find(What:=strToFind, LookAt:=xlPart)
If Not rngC Is Nothing Then
FirstAddress = rngC.Address
Do
rngC.EntireRow.copy wSht.Cells(intS, 1)
intS = intS + 1
Set rngC = .FindNext(rngC)
Loop While Not rngC Is Nothing And rngC.Address <> FirstAddress
End If
End With
End Sub