View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
tom[_7_] tom[_7_] is offline
external usenet poster
 
Posts: 24
Default Cells Contents Anywhere Else in Column

Just wanted to share the final solutions - I played with the find
method of Range, but it just was not happening for me. While ugly, it
solved the problem.

Thanks to all.
------------
Sub checkContents()

Dim intRow As Integer
Dim cellString As String
Dim testString As String
Dim cellAddress As String

For Each cell In Range("k1", "k5072")
intRow = 5072
cellString = cell.Text
cellAddress = cell.Address

Do While intRow < Range(cellAddress).Row
testString = Cells(intRow, 11).Text
If testString = cellString Then
Cells(intRow, 12).Interior.ColorIndex = 46
Cells(intRow, 12).Value = cellAddress
End If
intRow = intRow - 1
Loop

Next cell

MsgBox "Done!"

End Sub
--------------

-tom