Hi all, I'm having problems with the formula, I have attached a sample workboook, any ideas much appreciated. I have commented out the filter as it has been copied with the filter on, if you need to replace the filter the column to (subtota)l is (column E)
Sub Filter_sum()
Set W1 = Worksheets("Master")
Set Lastrow = W1.Cells(Rows.Count, "E").End(xlUp).Offset(1, 0)
' Selection.AutoFilter
'W1.Range("$A$1:$AC$355").AutoFilter Field:=20, Criteria1:="340"
Lastrow.Select
ActiveCell.FormulaR1C1 = "=SUBTOTAL(109,E2 & Lastrow-1)"
End Sub
Bookmarks