Kindly give the solution for Copy & Paste only visible cells, in attached sample there are two sheets, i want data from sheet1 to sheeh2 through copy and paste only in visible cells.
Sub CopyPasteFilteredData()
Worksheets("Sheet1").UsedRange.SpecialCells(xlCellTypeVisible).Copy _
Destination:=Worksheets("Sheet2").Range("A1")
End Sub