+ Reply to Thread
Results 1 to 9 of 9

Copy paste rows (with numbers under column A) from one sheet to another

Hybrid View

  1. #1
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Copy paste rows (with numbers under column A) from one sheet to another

    Try:

    Sub PickMe()
    Dim ws1 As Worksheet:   Set ws1 = Sheets("Sheet1")
    Dim ws2 As Worksheet:   Set ws2 = Sheets("TableofContents")
    Dim LR As Long
    Dim icell As Range
    
    LR = ws1.Range("A" & Rows.Count).End(xlUp).Row
    Application.ScreenUpdating = False
    For Each icell In ws1.Range("A1:A" & LR).SpecialCells(xlCellTypeConstants, xlNumbers)
        icell.Copy Destination:=ws2.Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
    Next icell
    Application.ScreenUpdating = True
    
    End Sub

  2. #2
    Registered User
    Join Date
    03-26-2013
    Location
    Chicago, USA
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Copy paste rows (with numbers under column A) from one sheet to another

    Thanks for the code. Though, the code only pastes the numbers and not other content in that row. Can I use copy.entirerow in the same code?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1