Hi -
I am filtering on values on a Raw Data tab and want to Copy and Paste the values into a different sheet (75% - 95% Opps). I am so close to getting it right.....expect I want to paste the values from the Raw Data tab in a different column / order on the new sheet. Right now its just pasting them in the order they are in the Raw Data tab
Also, is there a way to do this without ranges? Since the number of rows will change every time?
Thank you!!
Sub Opps_Btwn_75_95()
'
' Opps_Btwn_75_95 Macro
' Clear Data from Sheet
Sheets("75% - 95% Opps").Range("A2:G200").Clear
' Filter Seller POD
Dim ary As Variant
Dim i As Long
ary = Array("Auto", "Multi", "Tech", "Lifestyle")
For i = 0 To UBound(ary)
With Sheets("Raw Data")
If .AutoFilterMode Then .AutoFilterMode = False
With .Range("A1:W1")
.AutoFilter 11, ">=" & 75
.AutoFilter 11, "<" & 100
.AutoFilter 19, ary(i)
End With
'select these columns and paste them into the 75% - 95% Opps sheet in this order
Intersect(.AutoFilter.Range, .Range("C2:C10000,B2:B10000,Q2:Q10000,K2:K10000,R2:R10000,A2:A10000,S2:S10000")).Copy Sheets("75% - 95% Opps").Range("A2")
.AutoFilterMode = False
End With
Next i
End Sub
I am filtering on values on a Raw Data tab and want to Copy and Paste the values into a different sheet (75% - 95% Opps). I am so close to getting it right.....expect I want to paste the values from the Raw Data tab in a different column / order on the new sheet. Right now its just pasting them in the order they are in the Raw Data tab
Also, is there a way to do this without ranges? Since the number of rows will change every time?
Thank you!!
Sub Opps_Btwn_75_95()
'
' Opps_Btwn_75_95 Macro
' Clear Data from Sheet
Sheets("75% - 95% Opps").Range("A2:G200").Clear
' Filter Seller POD
Dim ary As Variant
Dim i As Long
ary = Array("Auto", "Multi", "Tech", "Lifestyle")
For i = 0 To UBound(ary)
With Sheets("Raw Data")
If .AutoFilterMode Then .AutoFilterMode = False
With .Range("A1:W1")
.AutoFilter 11, ">=" & 75
.AutoFilter 11, "<" & 100
.AutoFilter 19, ary(i)
End With
'select these columns and paste them into the 75% - 95% Opps sheet in this order
Intersect(.AutoFilter.Range, .Range("C2:C10000,B2:B10000,Q2:Q10000,K2:K10000,R2:R10000,A2:A10000,S2:S10000")).Copy Sheets("75% - 95% Opps").Range("A2")
.AutoFilterMode = False
End With
Next i
End Sub