View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Marco code needed to find contents of cell a1 in entire workbook

Sub findit()
Dim s1 As Worksheet, s As Worksheet
Dim r As Range, v As Variant
Set s1 = ActiveSheet
n = s1.Name
v = Range("A1").Value
For Each s In Worksheets
s.Activate
nn = s.Name
For Each r In ActiveSheet.UsedRange
If nn = n And r.Address = "$A$1" Then
Else
If r.Value = v Then
r.Select
Exit Sub
End If
End If
Next
Next
s1.Activate
End Sub
--
Gary''s Student - gsnu200843


"gmc" wrote:

Marco code needed to find contents of cell a1 in entire workbook and then go
to that cell.