title: Vlookup return multiple values
body: <p>I am trying to do Vlookup to return multiple values. However, the function takes really long to load. Is there any way to make it faster ? I got the function from online: <a href="https://www.extendoffice.com/documents/excel/2706-excel-vlookup-return-multiple-values-in-one-cell.html" rel="nofollow noreferrer">https://www.extendoffice.com/documents/excel/2706-excel-vlookup-return-multiple-values-in-one-cell.html</a></p>
  
  <pre><code>  Function MYVLOOKUP(pValue As String, pWorkRng As Range, pIndex As Long)
    Dim rng As Range
    Dim xResult As String
    xResult = ""
    For Each rng In pWorkRng
     If rng = pValue Then
      xResult = xResult &amp; " " &amp; rng.Offset(0, pIndex - 1)
    End If
   Next
   MYVLOOKUP = xResult
   End Function
  </code></pre>
  
  <p>This is the code in the sub </p>
  
  <pre><code> Sub sort()
  Dim x As Integer
  Dim result As Variant
  Dim name As String
   Application.ScreenUpdating = False
    x = 10
   Do Until IsEmpty(Sheet9.Cells(x, 1).Value)
   name = Sheet9.Cells(x, 1).Value
   result = MYVLOOKUP(name, Sheet9.Range("K:M"), 3)
   Sheet9.Cells(x, 4).Value = result
   x = x + 1
   Loop
   End Sub
  </code></pre>