Hi ksp
This should do the trick
Public Sub MarkCategory()
Dim lRow As Long
lRow = 13
Do While Not IsEmpty(Cells(lRow, 1))
If Cells(lRow, 1).Value < Cells(lRow - 1, 1) Then
With Range("A" & lRow & ":K" & lRow)
.Interior.ColorIndex = 4
End With
End If
lRow = lRow + 1
Loop
End Sub
HTH,
Executor
ksp wrote:
Hi All
I need some help with a macro to locate the first occurance of text in
a list so that I can then select that row and format it ie like a mini
heading
Here's an example:
My range (a named range called WIP_Area) goes from A12:K12 and then
down, in column A there is a list of text that has the following
categories: Incoming, Work in Progress, On Hold and Other. The rows are
sorted so that each category is grouped. I want to locate the first
occurance of each of these categories in column A (however a category
may not appear at all), then select the range A:K for that row so that
I can then apply a fill / shading to the range.
I am sure that this is quite simple when you know how
Any help would be appreciated
Thanks
KSP
--
ksp
------------------------------------------------------------------------
ksp's Profile: http://www.excelforum.com/member.php...fo&userid=6267
View this thread: http://www.excelforum.com/showthread...hreadid=550885