+ 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

    Like This:

    Sub PickMe()
    Dim ws1 As Worksheet:   Set ws1 = Sheets(Worksheets.Count)
    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.EntireRow.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

    Unfortunately throws a "1004" error on

    For Each icell In ws1.Range("A1:A" & LR).SpecialCells(xlCellTypeConstants, xlNumbers)

+ 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