Thanks, What do you mean repeat the field twice in the header row?
I've tried what I think you are suggesting, and am receiving the following error at the line for the advanced filter
Method 'range' of object '_Global' failed
Sub Filter_Report()
Dim crit1 As Single
Dim crit1lo As Single
Dim crit1hi As Single
Dim crita As Range
Dim report As Worksheet
Dim r As Integer
Dim rr As Integer
Dim rt As Integer
Dim data As Worksheet
Dim data1 As Range
Dim crit1rng As Range
Dim temp As Worksheet
Dim s As Integer
Dim rate As Range
Dim symbol As String
Set temp = Workbooks("MT_Optimizer").Sheets("Temp_Report")
Set report = Workbooks("MT_Optimizer").Sheets("Report")
Workbooks("MT_Optimizer").Sheets("AAPL_Days_1").Select
Set data = Workbooks("MT_Optimizer").Sheets("AAPL_Days_1")
Set rate = Workbooks("MT_Optimizer").Sheets("Temp_Report").Range("G1:R3")
s = 4
r = data.Cells(data.Rows.Count, "A").End(xlUp).Row
rr = report.Cells(data.Rows.Count, "A").End(xlUp).Row
rt = temp.Cells(data.Rows.Count, "A").End(xlUp).Row
crit1 = data.Cells(8400, 51).Value
crit1lo = crit1 - 0.05
crit1hi = crit1 + 0.05
'If ActiveSheet.AutoFilterMode Then
'ActiveSheet.ShowAllData
'End If
data.Range("A4:BO" & r).AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range(">=" & crit1lo & "<=" & crit1hi), _
copytorange:=temp.Range("A5")
'Rows(s + 1).Select
'Range(Selection, Selection.End(xlDown)).Select
'Selection.Copy
'temp.Activate
'temp.Range("A5").Select
'temp.Paste
temp.Calculate
temp.Range("G2:AP2").Select
Selection.Copy
report.Select
rr = report.Cells(data.Rows.Count, "A").End(xlUp).Row
report.Cells(rr + 1, 10).PasteSpecial xlPasteValues
report.Cells(rr + 1, 2).Value = crit1
end sub
Bookmarks