Conditional formatting
Put this in ThisWorkbook, not in a module:
Private Sub Workbook_SheetSelectionChange( _
ByVal Sh As Object, ByVal Target As Range)
Dim rng As Range
Set rng = Sh.Range("A1:AA50")
rng.Cells.Interior.ColorIndex = 0
If Target.Column = 1 And _
Target.Cells.Count = 1 Then
For Each cell In rng
If cell = Target.Value Then
cell.Interior.ColorIndex = 8
End If
Next cell
End If
End Sub
--
Dan
On Apr 1, 9:56*am, Andre wrote:
Hi Guys
I have looked in conditional formatting section but haven't been able to
find a solution to this problem.
I have a table of text imported daily into cells range A1:AA50
The latest data is that in column A
I therefore need to be able to move my cursor down or up column A at my
discression, and as the cursor moves to each new cell location, so the
background colour of all cells in the range with the matching text should
highlight.
Any idea??
--
Andre
|