Hi,
I'm updating a price list that has a header/index page with the relevant products on seperate worksheets.
From the header/index page the user is given buttons to click to take them to the relevant page. This is all works fine.
However, I require a search function from this header page for the user to search for a particular key word or string and then be taken directly to the relevant price list page.
I've managed to create a macro for a search string, however, this only points to the cell reference on the header/index page without taking the user to the cell reference/searched string.
Any assistance is greatly appreciated.
The macro VBA search is:
[VBA]Sub SearchBooks()
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[/VBA]
If required I can send a stripped down copy of the workbook.
Thanks in advance
Simon