NIPUL JARIWALA
Board Regular
- Joined
- Apr 22, 2016
- Messages
- 55
I want if sheet8.cells(Y,20) is in listbox7's column20
Then it should not be added in listbox7
Please help me.
Then it should not be added in listbox7
Please help me.
Code:
Dim X, Y As Integer
For X = 0 To ListBox8.ListCount - 1
If ListBox8.Selected(X) Then
For Y = 3 To Sheet8.Range("a1048576").End(xlUp).Row
If Sheet8.Cells(Y, 1) = ListBox8.List(X, 0) Then
AI = ListBox7.ListCount
ListBox7.AddItem
ListBox7.List(AI, 0) = Sheet8.Cells(Y, 1)
End If
Next Y
End If
Next X
Last edited by a moderator: