View Single Post
  #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?