Hi...
i have to this VBA Code about Filter #N/A but i have a problem.When Data NOT found "#N/A" not working
-If Have "#N/A" Working
-If no Have "#N/A" not Working
i want to when no Have "#N/A" continue working
i have to this VBA Code about Filter #N/A but i have a problem.When Data NOT found "#N/A" not working
-If Have "#N/A" Working
-If no Have "#N/A" not Working
i want to when no Have "#N/A" continue working
VBA Code:
Sub Add_Subtotals()
LastRow = Range("O" & Rows.Count).End(xlUp).Row - 1
Range("A1:W" & LastRow).AutoFilter Field:=23, Criteria1:="#N/A"
ActiveSheet.Range("A2:W" & LastRow).SpecialCells(xlCellTypeVisible).Copy
Range("A" & LastRow + 3).PasteSpecial xlPasteValues
Application.CutCopyMode = False
'Remove AutoFilter
ActiveSheet.AutoFilterMode = False
End Sub
Last edited by a moderator: