+ Reply to Thread
Results 1 to 3 of 3

Rearrange Data

  1. #1
    Registered User
    Join Date
    09-18-2006
    Posts
    7

    Rearrange Data

    I have a worksheet that contains data in the first three columns and then the 4th column is empty and then there's data in the next three columns and then an empty column etc....

    How can I cut the data from columns E to G and I to K and M to O etc....and paste it directly below the data in columns A to C?

    I dont know how many columns of data there are in the worksheet and every set of 3 columns of data (eg. E to G) varies in size.

    I recorded the following macro of what I want to do.

    Sub rearrange()

    Range("E1:G1").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Cut
    Range("A95").Select
    ActiveSheet.Paste
    Range("I1:K1").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Cut
    Range("A203").Select
    ActiveSheet.Paste
    Range("M1:O1").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Cut
    Range("A386").Select
    ActiveSheet.Paste
    End Sub

  2. #2
    Forum Contributor colofnature's Avatar
    Join Date
    05-11-2006
    Location
    -
    MS-Off Ver
    -
    Posts
    301
    This should work:

    Please Login or Register  to view this content.
    HTH
    Col
    If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.

  3. #3
    Registered User
    Join Date
    09-18-2006
    Posts
    7
    Thank you so much. This worked perfectly.

+ 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