Results 1 to 6 of 6

Thread: Search word in different workbooks and sheets

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member
    Join Date
    Nov 2012
    Posts
    47
    Rep Power
    0

    Search word in different workbooks and sheets

    Hello to all.
    I would like to ask you if you find someone who can help me with these two macros that work very well but for certain things. So because I do not understand many will not explain what the problem is:
    The first is made so that the popup window to search for a word in countless workbooks, it does but only in the open sheet of the workbook. So you can be less that the revised starting from the first workbook, going through all the paper then goes to the second sheet and check all the way to the end?
    Code:
    Sub SearchBookss()
    SearchWord = InputBox("Enter the string to search for")
    For i = 1 To Workbooks.Count
    Workbooks(i).Activate
    Range("A1").Activate
    FindAnother:
    Set WordAddress = Cells.Find(What:=SearchWord, after:=ActiveCell, LookIn:=xlFormulas, lookat:= _
    xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False)
    If WordAddress Is Nothing Then
    MsgBox ActiveWorkbook.Name & Chr(13) & "Search string not found"
    Else:
    If WordAddress.Address = CheckCell Then GoTo NextBook
    If ActiveCell.Address = "$A$1" Then CheckCell = WordAddress.Address
    Address = WordAddress.Address
    MsgBox ActiveWorkbook.Name & Chr(13) & Address
    Range(Address).Activate
    GoTo FindAnother
    End If
    NextBook:
    Next i
    End Sub
    I want to thank you in advance for all your help.
    Last edited by Admin; 11-29-2012 at 02:15 PM.

Similar Threads

  1. Replies: 7
    Last Post: 08-24-2015, 10:58 PM
  2. Replies: 3
    Last Post: 05-14-2013, 03:25 PM
  3. Replies: 2
    Last Post: 11-08-2012, 01:15 PM
  4. Replies: 1
    Last Post: 10-16-2012, 01:53 PM
  5. VBA Function to Search in Array
    By Admin in forum Excel and VBA Tips and Tricks
    Replies: 0
    Last Post: 04-10-2012, 11:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •