This code does all perfect only to delete the visible cells it give me an error, may help
VBA Code:
Sub CopyPartOfFilteredRange()
Dim src As Worksheet
Dim tgt As Worksheet
Dim filterRange As Range
Dim copyRange As Range
Dim lastRow As Long
Set src = ThisWorkbook.Sheets("DB - RawData")
Set tgt = ThisWorkbook.Sheets("Sheet12")
tgt.Cells.Clear
' turn off any autofilters that are already set
src.AutoFilterMode = False
' find the last row with data in column A
lastRow = src.Range("A" & src.Rows.Count).End(xlUp).Row
' the range that we are auto-filtering (all columns)
Set filterRange = src.Range("A7:DD7" & lastRow)
' the range we want to copy (only columns we want to copy)
' in this case we are copying country from column A
' we set the range to start in row 2 to prevent copying the header
Set copyRange = src.Range("A7:DI" & lastRow)
' filter range based on column B
filterRange.AutoFilter field:=106, Criteria1:="<>"
filterRange.AutoFilter field:=107, Criteria1:="<>"
filterRange.AutoFilter field:=108, Criteria1:="<>"
' copy the visible cells to our target range
' note that you can easily find the last populated row on this sheet
' if you don't want to over-write your previous results
copyRange.SpecialCells(xlCellTypeVisible).Copy tgt.Range("A7")
src.Select
filterRange.Offset(1, 0).SpecialCells(xlCellTypeVisible).EntireRow.Delete ' This part is not working
End Sub