P
paul mueller
I need to get a list from each worksheets "B"column, then fill a listbox
with unique items from that list, when an item is selected, to match it to
all matching items within column "B" on each sheet and copy the row that the
matching item is on to Sheet1.
I have tried using the code written from http://www.rondebruin.nl/copy5.htm
to try and make it work for me, but still no luck.
Dim sh As Worksheet
Dim DestSh As Worksheet
Dim range As range
On Error Resume Next
If Len(ThisWorkbook.Worksheets.Item("Main").Name) = 0 Then
On Error GoTo 0
Application.ScreenUpdating = False
DestSh.Name = "Main"
For Each sh In ThisWorkbook.Worksheets
If sh.Name <> DestSh.Name Then
range("B2", range("B65536").End(xlUp)).AdvancedFilter _
Action:=xlFilterCopy, CopyToRange:=Sheet1.range("A:A"),
Unique:=True
End If
Next
Cells(1).Select
Application.ScreenUpdating = True
End If
with unique items from that list, when an item is selected, to match it to
all matching items within column "B" on each sheet and copy the row that the
matching item is on to Sheet1.
I have tried using the code written from http://www.rondebruin.nl/copy5.htm
to try and make it work for me, but still no luck.
Dim sh As Worksheet
Dim DestSh As Worksheet
Dim range As range
On Error Resume Next
If Len(ThisWorkbook.Worksheets.Item("Main").Name) = 0 Then
On Error GoTo 0
Application.ScreenUpdating = False
DestSh.Name = "Main"
For Each sh In ThisWorkbook.Worksheets
If sh.Name <> DestSh.Name Then
range("B2", range("B65536").End(xlUp)).AdvancedFilter _
Action:=xlFilterCopy, CopyToRange:=Sheet1.range("A:A"),
Unique:=True
End If
Next
Cells(1).Select
Application.ScreenUpdating = True
End If