Create 2 Dynamic Named Range. Name the one with "KVBAT" "KVBLTH" "KVDNW" etc as LookRange and the other FindRange. Now run the code below. It will place the matching into the Column (same row as match) to the immediate right of FindRange.
Code:Sub FindText() Dim rCell As Range, rFindIn As Range Dim strWord As String, lLoop As Long Dim rFound As Range Set rFindIn = Range("FindRange") For Each rCell In Range("LookRange") strWord = rCell Set rFound = rFindIn.Cells(1, 1) For lLoop = 1 To WorksheetFunction.CountIf(rFindIn, "*" & strWord & "*") Set rFound = rFindIn.Find(What:=strWord, After:=rFound, LookIn:=xlValues, LookAt _ :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False) rFound(1, 2) = strWord Next lLoop Next rCell End Sub



Reply With Quote

Bookmarks