Option Explicit
Sub 匹配()
Dim a(1), i, j
For i = 1 To UBound(a) + 1
a(i - 1) = Cells(1, i).Resize(Cells(Rows.Count, i).End(xlUp).Row).Value
Next
For i = 1 To UBound(a(0))
For j = 1 To UBound(a(1))
If InStr(a(0)(i, 1), a(1)(j, 1)) Then Exit For
Next
If j = UBound(a(1)) + 1 Then a(0)(i, 1) = "省外" Else a(0)(i, 1) = "省内"
Next
[d1].Resize(UBound(a(0))) = a(0)
End Sub