title: Loop through an array and then move some elements
body: <p>So, im trying to write a code that will loop through an array and find if that element is in another array, then I'm trying to play with them, as I'm newbie to VBA, some of the code I wrote myself, and some of it I borrow from here (like this fuction below)</p>
  
  <p>To be more clear (as you can see below - link to a screenshot), im looping through column data and looking if each element (in each cell) is on my list to the left. If yes it should extract it next to the data column. But what I wrote so far it is extracting only one of element. I'm not sure where I should add some condition which would work like on the screen below.</p>
  
  <p><a href="https://ibb.co/kn70jb" rel="nofollow noreferrer">https://ibb.co/kn70jb</a></p>
  
  <pre><code>Sub Find_other()
  
  Dim i, j, As Integer
  Dim splitArray() As String
  
  
  
  Set dataSheet = Worksheets("Data")
  maxRow = dataSheet.UsedRange.Rows(dataSheet.UsedRange.Rows.Count).Row
  
  
  
  Range("A2").Select
  List_Array = Range(Selection, Selection.End(xlDown)).Value
  
  
  
  For i = 2 To maxRow
      fullVal = dataSheet.Cells(i, 3).Value
      splitArray() = Split(fullVal, "|")
      For j = 0 To UBound(splitArray)
          partVal = splitArray(j)
          If isInArray(partVal, List_Array) = False Then
          Cells(i, 4) = partVal
          End If
  
      Next j
  Next i
  
  End Sub
  
  
  Function isInArray(ByVal stringToBeFound As String, ByVal arr As Variant) As Boolean
  For Each element In arr
      If element = stringToBeFound Then
          isInArray = True
          Exit Function
      End If
  Next element
  End Function
  </code></pre>
  
  <p>Thanks for any suggestions.</p>