+ Reply to Thread
Results 1 to 10 of 10

Cut info from a column and paste it under a designated column

  1. #1
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    521

    Cut info from a column and paste it under a designated column

    Dear Experts
    I am seeking help on a macro which will cut info from a column and paste it under a designated column.
    There is a huge table starting from row 2 goes up column CH row 2 is a header (Row 1 is blank). Data is till row 110 (Row numbers and column numbers may vary from file to file). Column A to C have text and data starts from column D and all the way to CH. Help is required to cut all the columns starting from E and paste it column D and do it till the last column.
    To identify data it should also insert a column A and paste the header of each row which is cut and pasted in column D
    Not too sure if I have explained myself correctly or not hence attaching a sample.
    Thanks in advance/VKS
    Attached Files Attached Files
    Last edited by VKS; 01-03-2013 at 12:54 PM.

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Cut info from a column and paste it under a designated column

    try this

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    521

    Re: Cut info from a column and paste it under a designated column

    I get the compile error. "Expected End Sub"

  4. #4
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Cut info from a column and paste it under a designated column

    just add end sub at the bottom, that line did not get copied...

  5. #5
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    521

    Re: Cut info from a column and paste it under a designated column

    Attached, please find the error i am getting now.

  6. #6
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    521

    Re: Cut info from a column and paste it under a designated column

    Sorry. Attachment didnt get loaded. Attached is the screen shot of new error i am getting now.
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Cut info from a column and paste it under a designated column

    make sure that your tabs are named sheet1(input), sheet3(output)

  8. #8
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    521

    Re: Cut info from a column and paste it under a designated column

    Says Runtime error 9
    subscript out of range

  9. #9
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Cut info from a column and paste it under a designated column

    I am including the entire file. It ran in my computer
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    521

    Re: Cut info from a column and paste it under a designated column

    Thanks a lot. Worked like a magic.

  11. #11
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    521

    Re: Cut info from a column and paste it under a designated column

    Dear RCM, I think i must share with you the reason i was getting the errors that i was getting. My real time workbook had only one sheet.
    After inserting two more sheets and giving them name Sheet1(to real data sheet) sheet2 (a blank sheet) and sheet3(again a blank sheet) and running the macro from sheet1 gave me what both of us expected as outcome. I am impressed. Thanks a lot once again. VKS

+ 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