• 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.

VBA snippet to paste [Selection.End(xlDown)).Select] data

Hi,

Can anyone please help me with a VBA code snippet to paste the selected data. Presently I've the below & trying to find an efficient way to copy&paste data without any bug.

Sub endxldownData()
Worksheets("Home").Activate
Range("P11").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Home").Range("B11").PasteSpecial (xlPasteValues)
Application.CutCopyMode = False

End Sub
 
Hi Karthik..

Try this..

Code:
Sub endxldownData()
    With Sheets("Home")
        .Range("B11:B" & .Range("p11").End(xlDown).Row) = _
            Range("p11:p" & .Range("p11").End(xlDown).Row).Value
    End With
End Sub
 
Back
Top