Range SearchRng is a predefined range that I have!
If I want to search SearchRng for text "Test" then I would use this code
However, instead of "Test", I want to find Cell with Interior.ColorIndex = 4Set rFind = SearchRng.Find("Test", LookIn:=xlValues, Lookat:=xlWhole, _ SearchOrder:=xlNext, MatchByte:=True)
Would you help please!?
Thank you,
NTB
Last edited by NTB; 08-18-2011 at 02:52 PM.
Hi NTB, if you want to find a cell with a particular interior colour, than I would go with something likeYou will have to substitute the range I used with yours and then add what you want to do to the cells once you find them though. Let me know if this helps.Sub NTB() Dim rFind As Range, SearchRng As Range Dim ws As Worksheet Set ws = Worksheets("Sheet1") Set SearchRng = ws.Range("A2:D5") For Each rFind In SearchRng If rFind.Interior.ColorIndex = 4 Then MsgBox "Green found in range " & rFind.Address End If Next rFind End Sub
Please leave a message after the beep!
Mordred: That is exactly what I currently have. Somehow I thought it is insufficient, so I was hoping for some faster find. Let's see if we have another method - if not I will close SOLVED this thread.
Thank you once again!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks