Advertisement
YasserKhalil2019

T3815_Extract Items Not Listed In Another Column

Aug 28th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. https://excel-egy.com/forum/t3815
  2. ---------------------------------
  3.  
  4. Sub Extract_Items_Not_Listed_In_Another_Column()
  5. Dim a, x, i As Long, j As Long
  6.  
  7. a = Range("A2:B" & Cells(Rows.Count, 1).End(xlUp).Row).Value
  8. ReDim b(1 To 1000)
  9.  
  10. For i = LBound(a) To UBound(a)
  11. x = Application.Match(a(i, 1), Columns(2), 0)
  12. If IsError(x) Then
  13. j = j + 1
  14. b(j) = a(i, 1)
  15. End If
  16. Next i
  17.  
  18. Range("E2").Resize(j).Value = Application.Transpose(b)
  19. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement