Results 1 to 7 of 7

Copy paste column

Threaded View

  1. #1
    Forum Contributor
    Join Date
    09-19-2017
    Location
    London
    MS-Off Ver
    2015
    Posts
    169

    Question Copy paste column

    Hi, all

    I have this one file where I need to copy paste the filled cells in column A in a table from Sheet Raw data to column A in MB.

    This is quite simple though hence I already wrote one short code.

    But it shows application-defined or object-defined error.

    Sub main()
        Dim r As Range
    
        Set r = ActiveWorkbook.Sheets("Raw Data").Range("A")
        Do While r.Value <> ""
            ActiveWorkbook.Sheets("MB").Range("A").Value = r.Value
            Set r = r.Offset(1)
        Loop
    End Sub
    Is it because I'm dealing with a table instead of cells? Hope anyone can enlighten me. Thanks!
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 6
    Last Post: 02-28-2018, 09:40 AM
  2. Replies: 0
    Last Post: 10-29-2015, 04:15 PM
  3. Replies: 1
    Last Post: 05-30-2015, 04:38 PM
  4. How do I make the copy/paste of one column contingent on the copy/paste of another?
    By Kwasimitsu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-23-2014, 01:51 PM
  5. Replies: 3
    Last Post: 05-22-2013, 01:08 AM
  6. Vba - find next empty column, insert column, copy paste values & copy paste formulas
    By DoodlesMama in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2012, 12:43 PM
  7. Save column J only using copy/paste & temporary copy
    By mikeburg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-07-2006, 12:37 PM

Tags for this Thread

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