|
- Sub qq()
- Dim arr, brr, crr, i%, j%
- With Sheets("数据")
- .Range("c2:d1000").ClearContents
- arr = .[a1].CurrentRegion
- End With
- With Sheets("地区")
- brr = .[a1].CurrentRegion
- End With
- With Sheets("电话所在地")
- crr = .[a1].CurrentRegion
- End With
- For i = 2 To UBound(arr)
- For j = 2 To UBound(brr)
- If InStr(arr(i, 1), brr(j, 1)) <> 0 Then arr(i, 3) = brr(j, 2)
- Next
- For j = 2 To UBound(crr)
- If Val(Left(arr(i, 2), 7)) = crr(j, 1) Then arr(i, 4) = crr(j, 2)
- Next
- Next
- [a1].Resize(UBound(arr), UBound(arr, 2)) = arr
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|