Sub RangeCopyPaste()
Dim cell As Range
Dim NewRange As Range
Dim MyCount As Long
MyCount = 1
Dim cell2 As Range
Dim NewRange2 As Range
Dim MyCount2 As Long
MyCount2 = 1
Dim cell3 As Integer
Dim NewRange3 As Range
Dim MyCount3 As Long
MyCount3 = 1
Dim myarray As Variant
Dim myarray2 As Variant


For Each cell In Worksheets("Raw Data").Range("I:I")
If cell.Value = "BM" Then
If MyCount = 1 Then Set NewRange = cell.Offset(0, -5)
Set NewRange = Application.Union(NewRange, cell.Offset(0, -5))
MyCount = MyCount + 1
End If
Next cell

For Each cell2 In Worksheets("Product List").Range("E:E")
If cell2.Value = "Product" Then
If MyCount2 = 1 Then Set NewRange2 = cell2.Offset(0, -4)
Set NewRange2 = Application.Union(NewRange2, cell2.Offset(0, -4))
MyCount2 = MyCount2 + 1
End If
Next cell2



--> I know up to here works. I'm trying to create two Arrays for the dataset of NewRange and NewRange2. Then wanna compare each piece of data of NewRange to all the data in NewRange2 if it its a match copy the data from NewRange that matched onto a worksheet. <--




myarray = Array(NewRange2.Range(MyCount2)) <--- error
myarray2 = Array(NewRange.Range(MyCount)) <--- error


For cell3 = 1 To UBound(myarray2)
If Cells(cell3, 1) = Filter(myarray, cell3) Then
If MyCount3 = 1 Then Set NewRange3 = Cells(cell3, 1)
Set NewRange3 = Application.Union(NewRange3, Cells(cell3, 1))
MyCount3 = MyCount3 + 1
End If
Next cell3


NewRange3.Copy Destination:=Worksheets("Services").Range("C11")

End Sub