Hi,
As crazy as it seems, I am experiencing the same issue again that I had in July of last year. Thanks to jackpot to the original response. I added a line to try to reselect the entire worksheet as Jackpot suggested, the filter returns zero lines(which is correct) but using the command below still gives me an error that no cells were found. I would still want this blank filtered results to be able to copy and paste into another sheet for further formatting or, perhaps a way to bypass the error ( which I dont think I should use) the funny thing is that in some earlier s/s's, using the same macro, it copies over the blank filtered worksheet without a hitch...I am not a macro guru by any stretch, would appreciate any help on this!
Regards,
Gerry
ActiveSheet.UsedRange.Offset(0, 0).SpecialCells _
(xlCellTypeVisible).Copy
'creates a worksheet to paste all selected filtered rows
Set wsNew = ThisWorkbook.Worksheets.Add
wsNew.Name = "Fixed Int Rate Dist 10A"
'changes tab color to blue
Sheets("Fixed Int Rate Dist 10A").Select
ActiveWorkbook.Sheets("Fixed Int Rate Dist 10A").Tab.ColorIndex = 5
Set wsNew = ThisWorkbook.Worksheets.Add
wsNew.Name = "rates"
Sheets("rates").Select
'Filters out the >=3.5000, <=4.000, <=180origloanmonths, <=60 Remaining months
Sheets("Fixed rate Orig test").Select
Cells.EntireColumn.AutoFit
Columns("J:M").Select
Selection.delete Shift:=xlToLeft
Columns("F:F").Select
Selection.NumberFormat = "0.00"
Cells.Select
ActiveWorkbook.Save
Range("A1").Select
Selection.AutoFilter Field:=6, Criteria1:=">=3.500", Operator:=xlAnd, _
Criteria2:="<=4.000"
Selection.AutoFilter Field:=8, Criteria1:="<360", Operator:=xlAnd
Selection.AutoFilter Field:=9, Criteria1:="<=60", Operator:=xlAnd
ActiveSheet.UsedRange.Offset(0, 0).SpecialCells _
(xlCellTypeVisible).Copy
Sheets("rates").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Offset 2 leaves one line empty
'R1C5 = Row 1 Column 5 i.e. E1
'R[-1] equals one rows less than the cell the formula is in
'so if the formula is in cell E50 the formula will be E2:E48
Range("E65536").End(xlUp).Offset(1, 0).FormulaR1C1 = "=SUM(R1C5:R[-1]C)"
Columns("E:E").EntireColumn.AutoFit