Results 1 to 4 of 4

Copy and Paste Loop but keeps stopping

Threaded View

  1. #1
    Registered User
    Join Date
    05-13-2013
    Location
    London
    MS-Off Ver
    Excel 2010 Mac
    Posts
    19

    Copy and Paste Loop but keeps stopping

    Hi there,

    I have a table within my worksheet (example attached), and what I want to do is copy and paste data from individual columns so that they are listed underneath each other. So I basically want to cut the data in column 'Example 1' and paste them under the data in column 'Example', then delete the column it has just cut the data from, so that it shifts the columns to the left. Then I want to loop this process so that it cuts the data from column 'Example 2' and paste it under the data that I pasted from 'Example 1'. This is the code I'm using:

    FinalRow9 = Cells(Rows.Count, 8).End(xlUp).Row
    Range("c" & FinalRow9 + 1).Name = "Paste3"
    
    
    Do
        If Not Selection.Value > "" Then Exit Do
        ActiveCell.Offset(0, 0).Select
            Range(Selection.End(xlDown), Selection).Cut
            Range("Paste3").Select
            ActiveSheet.Paste
        Columns("D:D").Select
            Selection.Delete Shift:=xlToLeft
         ActiveCell.Offset(1, 0).Select
    Loop
    My problem is I get an error when it gets to Range("Paste3").Select. I tried to correct the problem with Range("C" & FinalRow9).Select, but it keep overwriting the data it has just cut and pasted from the previous column. I would appreciate any help you could give me on this.

    Thanks!
    Attached Files Attached Files
    Last edited by kksf; 06-25-2013 at 07:55 AM.

Thread Information

Users Browsing this Thread

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

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