Good day,
Much to my surprise, I was able to locate a "find all" function (which I'm including below). I've been able to get it to work the way I hoped it would, but am stuck now...
Once the function finds and selects the cells in question, I'd like to add a notation in the first available column for each row selected. Generally, I just use something like this to add notes to the first available column:
Range("xfd"& activecell.row).End(xlToLeft).Offset(0, 1).Select
But with this function, I can't seem to get anything to work. All I really need to do is offset 2 columns to the right of each selected cell and add some text like "FOUND"
Here's the findall function which I found here: http://www.ozgrid.com/forum/showthre...t=27240&page=1
Function Find_Range(Find_Item As Variant, Search_Range As Range, _
Optional LookIn As Variant, Optional LookAt As Variant, _
Optional MatchCase As Boolean) As Range
Dim c As Range
If IsMissing(LookIn) Then LookIn = xlValues 'xlFormulas
If IsMissing(LookAt) Then LookAt = xlPart 'xlWhole
If IsMissing(MatchCase) Then MatchCase = False
With Search_Range
Set c = .Find( _
What:=Find_Item, _
LookIn:=LookIn, _
LookAt:=LookAt, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=MatchCase, _
SearchFormat:=False)
If Not c Is Nothing Then
Set Find_Range = c
firstAddress = c.Address
Do
Set Find_Range = Union(Find_Range, c)
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
End Function
Thanks for any help/pointers (and I promise, this will be my last post today )
Bookmarks