
=corrispondente(D1)
Option Explicit
Function corrispondente(s As String) As String
Dim c As Range
Set c = [B:B].Find(s, LookAt:=xlWhole)
If c Is Nothing Then
corrispondente = "Not found"
Exit Function
End If
corrispondente = c.Offset(, -1)
End Function |
=corrispondente(D1)
Option Explicit
Function corrispondente(s As String) As String
Dim c As Range
Set c = [foglio1!$C$3:foglio1!$C$100].Find(s, LookAt:=xlWhole)
If c Is Nothing Then
corrispondente = 0
Exit Function
End If
corrispondente = c.Offset(, -1)
End Function
|
