Hi Guys,
Do you know any way?
The function is to Vlookup the array and return a name of the boss based on employees name.
I tried to declare the Array as a public but this does not work.
Maybe there is a way to pass a constant parameter to a function in a form of variant array?
I tried something like, maybe you can use that as a basis:
Regards,
Witek
Do you know any way?
The function is to Vlookup the array and return a name of the boss based on employees name.
I tried to declare the Array as a public but this does not work.
Maybe there is a way to pass a constant parameter to a function in a form of variant array?
I tried something like, maybe you can use that as a basis:
Code:
'People() is an 2d array
Function FindTheBoss(SalesEN As Variant, People() As Variant) As String
For i = 1 To UBound(People)
If People(i, 2) = Person Then
FindTheBoss = People(i, 1)
End If
Next i
End Function
Regards,
Witek