Please help asap!  I really appreciate it.

The code below will search through other worksheets and copy and paste
back the search criteria to the next line of a "report" worksheet.  It
works well except that it only does the first hit in each worksheet
and I need it to find multiple.  I think alls it needs is another For
Loop under the Loop that goes to the next worksheet but I dont know
how to implement that.

Thanks!


Dim Found As Range, ws As Worksheet, i As Long
Dim Foundtwo As Range, t As Long
i = 1
t = 1


For Each ws In ThisWorkbook.Worksheets

    If ws.Name <> ActiveSheet.Name Then
        Set Found = ws.UsedRange.Find(what:=" Directory*")
        If Not Found Is Nothing Then
            i = i + 1
            Worksheets("Report").Range("A" & i) = ws.Name
            Found.Resize(, 2).Copy
Destination:=Worksheets("Report").Range("B" & i)
        End If
    End If

    If ws.Name <> ActiveSheet.Name Then
        Set Foundtwo = ws.UsedRange.Find(what:="*.ost")
        If Not Found Is Nothing Then
            t = t + 1
            Foundtwo.Resize(, 2).Copy
Destination:=Worksheets("Report").Range("C" & t)
        End If
    End If

Next ws

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 7000 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

Reply via email to