Try this:
Sub Find_GR()
Dim lastrow As Long
Dim wsname As String
Dim ws As Integer
For ws = 1999 To 2006
wsname = Trim(Str(ws))
Worksheets(wsname).Activate
With Worksheets(wsname)
lastrow = .Cells(Rows.Count, "J").End(xlUp).Row
With .Range("J1:J" & lastrow)
Set c = .Find("GR", LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
Rows(c.Row).Interior.ColorIndex = 3
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With
End With
Next ws
End Sub
HTH
"mariasa" wrote:
Hi Guys,
could u please help me with the following macro:
i need it to go thru the column J of each of my worksheets (worksheet
names are 2006, 2005, 2004, 2003, 2002, 2001, 2000, 1999) and if it
finds "GR" as part of the name in the cell (say IFX GR - thats a
security id in bloomberg), it has to highlight the entire row ( i have
numerous columns in the sheet) and if it doesnt find "GR" it should do
nothing of course. I need this because i need to isolate (or highlight)
the german secondary offerings from the list of european ones.
Thanks so much in advance for your help!
mariasa
--
mariasa
------------------------------------------------------------------------
mariasa's Profile: http://www.excelforum.com/member.php...o&userid=31726
View this thread: http://www.excelforum.com/showthread...hreadid=557535