Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Search in Multiple Sheets

Hey, I have a workbook with many worksheets. I am trying to write a
macro to search all the worksheets for a unique value. I have a
userform to enter the value and assign it to a variable. I just need
to search all sheet for that string, and if that string exists in a
worksheet, activate that worksheet. Anyone done anything like this?
Can you help?

  #2   Report Post  
Posted to microsoft.public.excel.misc
JB JB is offline
external usenet poster
 
Posts: 115
Default Search in Multiple Sheets


Sub chercheFindMultiFeuillesValeur()
x = "ABCD"
For Each s In ActiveWorkbook.Sheets
With Sheets(s.Name).Cells
Set c = .Find(x, LookIn:=xlValues)
If Not c Is Nothing Then
premier = c.Address
Do
c.Interior.ColorIndex = 4
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < premier
End If
End With
Next s
End Sub

http://boisgontierjacques.free.fr/fi...iFeuilles2.xls

JB
http://boisgontierjacques.free.fr/

On 12 sep, 22:28, wrote:
Hey, I have a workbook with many worksheets. I am trying to write a
macro to search all the worksheets for a unique value. I have a
userform to enter the value and assign it to a variable. I just need
to search all sheet for that string, and if that string exists in a
worksheet, activate that worksheet. Anyone done anything like this?
Can you help?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,718
Default Search in Multiple Sheets

Just FYI, if you have Excel 2002 or later the built-in Find feature can be
set to search the entire workbook.

--
Jim
wrote in message
ups.com...
| Hey, I have a workbook with many worksheets. I am trying to write a
| macro to search all the worksheets for a unique value. I have a
| userform to enter the value and assign it to a variable. I just need
| to search all sheet for that string, and if that string exists in a
| worksheet, activate that worksheet. Anyone done anything like this?
| Can you help?
|


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Search in Multiple Sheets

See the answer posted in programming. Please do not mulit post. Check out
this link...

http://www.cpearson.com/excel/newposte.htm
--
HTH...

Jim Thomlinson


" wrote:

Hey, I have a workbook with many worksheets. I am trying to write a
macro to search all the worksheets for a unique value. I have a
userform to enter the value and assign it to a variable. I just need
to search all sheet for that string, and if that string exists in a
worksheet, activate that worksheet. Anyone done anything like this?
Can you help?


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Search in Multiple Sheets

xl2002 offers a find in workbook (under the Options button on the Edit|Find
dialog).

Then you can click on the line in the results window to go to that location.

I had to search for that site:

http://www.theupdown.com/

where you can "play" with investments.

wrote:

Hey, I have a workbook with many worksheets. I am trying to write a
macro to search all the worksheets for a unique value. I have a
userform to enter the value and assign it to a variable. I just need
to search all sheet for that string, and if that string exists in a
worksheet, activate that worksheet. Anyone done anything like this?
Can you help?


--

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
Search multiple sheets and return largest number found mpenkala Excel Worksheet Functions 2 January 4th 07 04:41 PM
Multiple Sheets (Need to create 500 individual sheets in one workbook, pulling DATA Amaxwell Excel Worksheet Functions 4 August 17th 06 06:23 AM
search multiple sheets for specific date, return data in cell to r NonIllegitimiCarborundum Excel Discussion (Misc queries) 0 April 28th 06 09:02 PM
Search for datats in different Exel sheets Franz Muster Excel Discussion (Misc queries) 2 February 9th 06 05:22 PM
How do I search excel spreadsheets using multiple search criteria. Kasper Excel Worksheet Functions 4 December 15th 05 12:26 AM


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