Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub match_col_a_b()
- Dim x As Integer '重要
- ii = 1
- For i = 1 To Cells(65536, 1).End(xlUp).Row
- On Error Resume Next
- x = Application.Match(Cells(i, 1), Range("b:b"), 0)
- If Not Err <> 0 Then
- Else
- Cells(ii, 3) = Cells(i, 1)
- ii = ii + 1
- End If
- Next
- '---
- ii = 1
- For i = 1 To Cells(65536, 2).End(xlUp).Row
- On Error Resume Next
- x = Application.Match(Cells(i, 2), Range("a:a"), 0)
- If Not Err <> 0 Then
- Else
- Cells(ii, 4) = Cells(i, 2)
- ii = ii + 1
- End If
- Next
- End Sub
Add Comment
Please, Sign In to add comment