LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Search Mutiple Excel Sheets.

Hello,

This is just a follow up to those that helped me figure
out how to search mutiple sheets. Here is the code i used,
i made some small modifications to it. I did not want to
search the first two sheets of my workbook so i added a
little counter to skip these two. Thanks again for those
who helped me out.

Ben

Dim sh As Worksheet
Dim rng As Range
Dim sTarget As String
Dim sCnt As Integer


sTarget = TextBox1.Text
For Each sh In ThisWorkbook.Worksheets
If sCnt 1 Then
Set rng = Nothing
Set rng = sh.Cells.Find(sTarget)

If Not rng Is Nothing Then
sh.Activate
rng.Select
Exit Sub
End If
End If
sCnt = sCnt + 1
Next

MsgBox "The search data was not found."
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Summing common cell over mutiple sheets within a file? Bill Excel Worksheet Functions 5 October 12th 09 10:09 PM
Running mutiple excel sheets on mutiple computers Lost Excel Discussion (Misc queries) 3 January 16th 09 12:32 AM
Sumif across mutiple sheets jwang036 Excel Worksheet Functions 3 May 29th 08 07:26 PM
Mutiple Spread Sheets ABA Excel Worksheet Functions 0 May 13th 08 10:10 PM
Search Mutiple WorkSheets Ben Jimenez Excel Programming 5 July 29th 03 09:48 PM


All times are GMT +1. The time now is 10:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"