Skip to content

Instantly share code, notes, and snippets.

@cpereira7
Created August 24, 2017 18:05
Show Gist options
  • Select an option

  • Save cpereira7/9e495aa7b1f3420066986fcc083ae28b to your computer and use it in GitHub Desktop.

Select an option

Save cpereira7/9e495aa7b1f3420066986fcc083ae28b to your computer and use it in GitHub Desktop.
PROCV - Valores multiplos.
Function MYVLOOKUP(lookupval, lookuprange As Range, indexcol As Long)
Dim r As Range
Dim result As String
result = ""
For Each r In lookuprange
If r = lookupval Then
result = result & " - " & r.Offset(0, indexcol - 1)
End If
Next r
MYVLOOKUP = result
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment