Here is what I have done.
I think I can only do this in VBA Macro Editor.
Every time I execute the below I get a
Compile Error:
Sub or Function not defined
and it points at the function header to the code below.
does anyone have any ideas?
Code:
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
For Sheet = 1 To 6
Worksheet(Sheet).Activate
totalRows = ActiveSheet.UsedRange.Rows.Count
For Row1 = totalRows To 2 Step -1
CellValue = Cells(Row1, 7).Value
For Row2 = Row1 - 1 To 2 Step -1
If CellValue = Cells(Row2, 7).Value And CellValue <> "" Then
Cells(Row2, 7).Color = RGB(255, 0, 0)
End If
Next Row2
Next Row1
Next Sheet
End Sub