View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default Finding a specific cell value on different sheet

you can try this:

Sub test()
Dim ws As Worksheet
Dim ws2 As Worksheet
Dim strToFind As String
Dim rngfound As Range
Set ws = Worksheets("Sheet1")
Set ws2 = Worksheets("sheet2")
If ActiveSheet.Name = ws2.Name Then
strToFind = ActiveCell.Value

With ws.Range("C2:c1000")
Set rngfound = .Find(strToFind, lookat:=xlWhole,
LookIn:=xlValues)
End With

If Not rngfound Is Nothing Then
ws.Range(rngfound.Address).Font.Bold = True
ActiveCell.Font.ColorIndex = 3
End If
End If
End Sub

--


Gary

"Looping through" wrote in message
...
Can that be done?

If the user selects and activates a cell in sheet 2 (C50 as an example), I
want to have a macro that will goto sheet 1, find the matching data within
cell C2-C1000 activate that cell and make it bold, then I want the macro to
come back to sheet 2 and change the original cell to Red.

Thanks