• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Copy & Paste only visible cells...

Nitesh Kumar

New Member
Hi Champ,


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.

don't use vlookup.
 

Attachments

  • Copy & Paste.xls
    41 KB · Views: 6
Hi,

Is this VBA proposal help for you?

Code:
Sub CopyPasteFilteredData()

    Worksheets("Sheet1").UsedRange.SpecialCells(xlCellTypeVisible).Copy _
        Destination:=Worksheets("Sheet2").Range("A1")

End Sub
 

Attachments

  • Copy & Paste.xlsm
    21 KB · Views: 2
Last edited:
Hi !

SpecialCells method is not necessary 'cause Copy like Delete methods
work only with visible cells ‼

OP must try just by activating Macro recorder !

Here is the formula forum, many samples in appropriate forum …
 
Back
Top