UNKNOWN '************************************** ' Name: search data place adjacent ' Description:This code is working with ' the following steps: Values used: first array is composedof words to search words. The name of array is searchArray second array is composed of the words that are related to search words. This array`s name is responsearray. the first and second array connection is made by an integer number arrayno. This number is used to make connection with the array inhibited numbering. This lets the coding being dynamic. How it works: The code is using arrayno to make a search of predefined words, then it gives in adjacent column the result words. By using looping I can make this search of string and place in adjacent column the result string many times I want in a list of data. Tips: place your data in column D or E in Excel , it needs to have 3 empty columns on the left of data. This is not yet perfect, I need to improve one part so as it stops looping when it reaches the end of data, this will be on version 2.0 Please tell me if you like it. ' By: Oruc Kenan Yildirim ' ' ' Inputs:None ' ' Returns:None ' 'Assumes:None ' 'Side Effects:None 'This code is copyrighted and has limite ' d warranties. 'Please see http://www.Planet-Source-Cod ' e.com/xq/ASP/txtCodeId.74400/lngWId.1/qx ' /vb/scripts/ShowCode.htm 'for details. '************************************** Sub searchplaceadjacent() '*************************************** ' ************** '*************************************** ' ************** '************code by Oruc Kenan Yildirim ' ************* '*********** search data place adjacent ' ************** '************version 1.0 ************* '************ oruc@outsideuniverse.com** ' *********** '************ www.outsideuniverse.com*** ' ********** '*************************************** ' ************** '*************************************** ' ************** Dim searchArray() As Variant Dim responsearray() As Variant Dim arrayno As Integer 'create array from list of comma separat ' ed strings searchArray = Array("fin fan", "yahoo", "wendy") responsearray = Array("cooler", "website", "dunes") 'search each array -- note there are thr ' ee content here to search for For firstloopsearchstring = 1 To 3 'first array`s number is zero, but first ' loopsearchstring has a value of 1, so I ' need to substract 1 arrayno = firstloopsearchstring - 1 'find the array corresponding value Cells.Find(What:=searchArray(arrayno), After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Activate 'make this search 100 times in a list - ' this part is very weak I know I need to ' improve it For seconddataloop = 1 To 100 'MOVING TO CELL '******** 'note here in the same row many of the s ' earch values could be there in the same ' time ' instead of overwriting it moves to ano ' ther column and writes response value in ' there '******** Row = 0 clms = (firstloopsearchstring) * (-1) ActiveCell.Offset(Row, clms).Select 'if adjacent activecell content is empty ' then write corresponding responsearray If ActiveCell = "" Then ActiveCell.FormulaR1C1 = responsearray(arrayno) 'MOVING TO CELL**return back Row = 0 clms = firstloopsearchstring ActiveCell.Offset(Row, clms).Select 'find next Cells.FindNext(After:=ActiveCell).Activate Else ' if activecell content is 'find next Cells.FindNext(After:=ActiveCell).Activate End If Next seconddataloop Next firstloopsearchstring End Sub