LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 21
Default Create a macro which can find a record in three books

for text

"Gary''s Student" wrote:

Are we searching for a number or text??
--
Gary''s Student - gsnu200724


"sand" wrote:

Thanks a lot for reply but following error accured during the operation

Run-time error 13: type mismatch


"Gary''s Student" wrote:

Try this:

Sub got_it()
Dim s As String
s = Application.InputBox("Enter search string: ")

For Each wb In Workbooks
wb.Activate
For Each sh In ActiveWorkbook.Sheets
sh.Activate
For Each r In ActiveSheet.UsedRange
If r.Value = s Then
MsgBox (wb.Name & sh.Name & r.Offset(0, 1).Address)
Exit Sub
End If
Next
Next
Next
MsgBox ("Nothing found")
End Sub

--
Gary''s Student - gsnu200723


"sand" wrote:

i havent use VB or Macro codings ever, How can i create a macro which can
find a record in three workbooks ( more than ten sheets each workbook )
and show me result data of next cell i.e. if the record found in Daily
Tracker format.xls]RMM'!$BP$21 then result will be Daily Tracker
format.xls]RMM'!$BQ$21



 
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
Record Macro to Create Pivot Table Ken Excel Discussion (Misc queries) 1 April 25th 07 09:42 PM
find last record in macro and delete all after Sherife Excel Discussion (Misc queries) 3 September 18th 06 03:51 AM
How do i get Excel find a sum of #s om different pages/books? Birthe Excel Worksheet Functions 4 September 13th 06 05:45 PM
HOW DO I DELETE BOOKS I CANNOT FIND? mrzero84 New Users to Excel 3 August 3rd 06 05:11 PM
macro to change the names and delete closed books Tim Excel Discussion (Misc queries) 2 February 6th 05 09:39 PM


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

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"