Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
KVee
 
Posts: n/a
Default How do I Print the Results of a FIND ALL from multiple worksheets?

Am working on Excel 2003
====================
I have hundreds of Worksheets within a few Master Files with similar
categories. I'm trying to generate Delivery Dockets from the Result of a
FIND ALL.

Anybody got any ideas? I'm not a novice but my programming skills are
limited but enthusiastic.

Many Thanks
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Saved from a previous post...

But you could use a macro...

Option Explicit
Sub testme01()

Dim curWkbk As Workbook
Dim wks As Worksheet
Dim RptWks As Worksheet
Dim oRow As Long

Dim FoundCell As Range
Dim FirstAddress As String
Dim FindWhat As String

FindWhat = InputBox(Prompt:="Find What?")
If FindWhat = "" Then
Exit Sub
End If

Set curWkbk = ActiveWorkbook
Set RptWks = Workbooks.Add(1).Worksheets(1)

With RptWks
.Range("a1").Resize(1, 4).Value _
= Array("Worksheet Name", "Address", "Value", "Formula")
End With

oRow = 1
For Each wks In curWkbk.Worksheets
With wks.Cells
Set FoundCell = .Find(what:=FindWhat, lookat:=xlPart, _
LookIn:=xlFormulas, _
after:=.Cells(.Cells.Count), _
searchdirection:=xlNext, MatchCase:=False)
If Not FoundCell Is Nothing Then
FirstAddress = FoundCell.Address
Do
oRow = oRow + 1
With RptWks.Cells(oRow, "A")
.Value = "'" & FoundCell.Parent.Name
.Offset(0, 1).Value = FoundCell.Address
With .Offset(0, 2)
.Value = FoundCell.Value
.NumberFormat = FoundCell.NumberFormat
End With
If FoundCell.HasFormula Then
.Offset(0, 3).Value = "'" & FoundCell.Formula
End If
End With
Set FoundCell = .FindNext(FoundCell)
Loop While Not FoundCell Is Nothing _
And FoundCell.Address < FirstAddress
End If
End With
Next wks

End Sub

It does the same as edit|find. Which means that it won't find stuff in cells
hidden by an autofilter (for example).

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

KVee wrote:

Am working on Excel 2003
====================
I have hundreds of Worksheets within a few Master Files with similar
categories. I'm trying to generate Delivery Dockets from the Result of a
FIND ALL.

Anybody got any ideas? I'm not a novice but my programming skills are
limited but enthusiastic.

Many Thanks


--

Dave Peterson
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
Print mult worksheets to Adobe John Day Excel Discussion (Misc queries) 2 May 25th 05 03:54 PM
Find & Replace - view results Claes G Excel Discussion (Misc queries) 2 March 16th 05 10:55 PM
Print the results of a search Celestina Excel Discussion (Misc queries) 1 January 12th 05 01:04 AM
Find & Replace results to display specified chosen fields samuel Excel Discussion (Misc queries) 1 December 28th 04 08:43 AM
Microsoft Excel could not find anything to print cyndi Excel Discussion (Misc queries) 1 December 22nd 04 01:40 PM


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

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"