Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Cells Contents Anywhere Else in Column

Seems the easiest way is to simply sort on the column. What do you want to do
it you find duplicates?


Just print the cell numbers elsewhere on the worksheet, where there
will then be manual intervention.

-tom

  #2   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
concatenate contents of cells whose contents resemble cell referem cathyh Excel Worksheet Functions 3 May 23rd 09 12:16 PM
Displaying contents of differnt cells from a column in pages' head pmdoherty Excel Discussion (Misc queries) 0 May 14th 09 12:39 PM
Paste changing cell contents to consecutive cells in a column meggy Excel Worksheet Functions 3 September 4th 07 09:21 PM
Insert contents of various cells in a column into one cell? TextCells Excel Discussion (Misc queries) 1 April 2nd 06 10:41 PM
How do I change a buttons contents depending on a cells contents? Kosh42|EFG Excel Programming 2 February 16th 05 02:39 PM


All times are GMT +1. The time now is 10:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"