Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Excel: 'Find All' macro

Hi,

I'm setting up a contact directory spreadsheet at the request of a
colleague, and it comprises of multiple sheets. I'm aware that I can simply
tell the user to select all of the worksheets and click c+F and the find all
option and it'll look for what they want, but I was wondering if it would be
possible to incorporate this as a macro, so the user needs only click one
button and type what they want to find in simply because I'm aware this
spreadsheet might be used by those with very little excel experience. I'd
like to simply automate the first few steps of the process i.e. 'select all
sheets', open find window, check 'find all' and then the user can simply type
in what they're looking for and click search.

I've tried recording it as a macro but the macro recorder doesn't pick up
any actions conducted in the find window, so any help on this would be much
appreciated!

Thankyou in advance,

Kirsty
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Excel: 'Find All' macro

Try the below..will certainly take you in the right direction

Sub Macro()
Dim varFound As Variant, varSearch As Variant
Dim strAddress As String, ws As Worksheet

varSearch = InputBox("Search string")
For Each ws In ActiveWorkbook.Sheets
ws.UsedRange.Interior.ColorIndex = 0
ws.UsedRange.Font.ColorIndex = 0
With ws.UsedRange
Set varFound = .Find(varSearch, LookIn:=xlValues)
If Not varFound Is Nothing Then
strAddress = varFound.Address
Do
varFound.Interior.ColorIndex = 3
varFound.Font.ColorIndex = 4
Set varFound = .FindNext(varFound)
Loop While Not varFound Is Nothing And _
varFound.Address < strAddress
End If
End With
Next
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"bawpie" wrote:

Hi,

I'm setting up a contact directory spreadsheet at the request of a
colleague, and it comprises of multiple sheets. I'm aware that I can simply
tell the user to select all of the worksheets and click c+F and the find all
option and it'll look for what they want, but I was wondering if it would be
possible to incorporate this as a macro, so the user needs only click one
button and type what they want to find in simply because I'm aware this
spreadsheet might be used by those with very little excel experience. I'd
like to simply automate the first few steps of the process i.e. 'select all
sheets', open find window, check 'find all' and then the user can simply type
in what they're looking for and click search.

I've tried recording it as a macro but the macro recorder doesn't pick up
any actions conducted in the find window, so any help on this would be much
appreciated!

Thankyou in advance,

Kirsty

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Excel: 'Find All' macro

You might be interested in my FindAll add-in. It allows you to select
any one or more worksheets in the active workbook, specify the various
search parameters, and it will search the ranges and sheets for a
value and display a list of the address of the found cells along with
the contents of those cells.

See http://www.cpearson.com/excel/FindAllXLA.aspx for details and
download.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Fri, 25 Sep 2009 03:29:02 -0700, bawpie
wrote:

Hi,

I'm setting up a contact directory spreadsheet at the request of a
colleague, and it comprises of multiple sheets. I'm aware that I can simply
tell the user to select all of the worksheets and click c+F and the find all
option and it'll look for what they want, but I was wondering if it would be
possible to incorporate this as a macro, so the user needs only click one
button and type what they want to find in simply because I'm aware this
spreadsheet might be used by those with very little excel experience. I'd
like to simply automate the first few steps of the process i.e. 'select all
sheets', open find window, check 'find all' and then the user can simply type
in what they're looking for and click search.

I've tried recording it as a macro but the macro recorder doesn't pick up
any actions conducted in the find window, so any help on this would be much
appreciated!

Thankyou in advance,

Kirsty

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 do I use 'Find All' and copy the entire row ldavis Excel Discussion (Misc queries) 1 August 6th 08 06:32 PM
Macro, or excel program to "Close All' while in a workspace Carlton Patterson Excel Programming 2 May 2nd 05 11:01 AM
Macro, or excel program to "Close All' while in a workspace Carlton Patterson Excel Programming 3 May 2nd 05 12:08 AM
How do I insert a 'clear all' button in excel? Nick Excel Worksheet Functions 3 December 13th 04 11:59 AM
Data Filtering 'Show All' macro Andy@d2i Excel Programming 1 October 12th 04 12:06 PM


All times are GMT +1. The time now is 11:58 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"