Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how to find the data in between the sheets?

Hi All,

I have a doubt, i have 25 sheets in the workbook in that i want to find the
data among the sheets, the data which i want to find, that will be in the 26
sheet (A1).

Thanks in advance!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 421
Default how to find the data in between the sheets?

Hi Junaid,

In a standard module, try something
like:

'==========
Public Sub Tester()
Dim WB As Workbook
Dim SH As Worksheet
Dim SH2 As Worksheet
Dim Rng As Range
Dim sStr As String

Set WB = Workbooks("myBook.xls") '<<==== CHANGE
Set SH2 = WB.Sheets("Sheet26") '<<==== CHANGE

sStr = SH2.Range("A1").Value

For Each SH In WB.Worksheets
On Error Resume Next
With SH
If .Name < SH2.Name Then
Set Rng = .Cells.Find _
(What:=sStr, _
After:=.Range("A1"), _
LookIn:=xlFormulas, _
LookAt:=xlWhole, _
Searchorder:=xlByRows, _
MatchCase:=False)
End If
End With
On Error GoTo 0
If Not Rng Is Nothing Then
Exit For
End If
Next SH

If Not Rng Is Nothing Then
MsgBox "The value " & sStr _
& " has found at " _
& Rng.Address(External:=True)
Else
MsgBox "The value " & sStr _
& " has not been found"
End If

End Sub
'<<============




---
Regards.
Norman


"Junaid" wrote in message
...
Hi All,

I have a doubt, i have 25 sheets in the workbook in that i want to find
the
data among the sheets, the data which i want to find, that will be in the
26
sheet (A1).

Thanks in advance!


Reply
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
how can I compare two data sheets to find variances? lizm Excel Discussion (Misc queries) 1 December 1st 09 11:49 PM
Using INDEX and MATCH to find data in 2 different sheets RMF Excel Worksheet Functions 5 February 1st 06 01:02 PM
how do i find data in multiple sheets in excel Karline Excel Discussion (Misc queries) 2 May 13th 05 03:33 PM
how do i find data in multiple sheets in excel Karline Excel Worksheet Functions 2 May 13th 05 03:26 PM
find data on 2 different sheets? Chris Vandecasteele Excel Programming 1 July 17th 03 05:18 AM


All times are GMT +1. The time now is 03:03 AM.

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

About Us

"It's about Microsoft Excel"