+ Reply to Thread
Results 1 to 12 of 12

Macro to Copy Second Column in all sheets to new sheet

  1. #1
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    171

    Macro to Copy Second Column in all sheets to new sheet

    hi

    please i need ur help,

    i want a macro to copy second column in all sheets (around 30 sheets in one excel file) to new sheet

    i used the following code

    Please Login or Register  to view this content.
    but this one will copy second column from specific sheet to specific sheet and will over-write the copied columns, i want to copy second column from all sheets to one new sheet (must be created with macro) with paste as value only.

    and all copied columns in the recently created sheet should be continuously, means

    second column from first sheet
    1
    1
    1
    1
    1
    1

    then

    second column from second sheet
    5
    4
    68
    4
    8
    8
    4
    4

    then

    second column from third sheet
    54
    787
    4645
    13258
    879
    34654


    sorry for the long thread
    many thanks in advance
    Last edited by boss1982; 12-29-2012 at 10:06 AM.

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Macro to Copy Second Column in all sheets to new sheet

    hi boss1982, please check attachment, the columns would go one by one, press "Run" button or run code "test"
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    171

    Re: Macro to Copy Second Column in all sheets to new sheet

    hi watersev,

    its exactly same as i want, the result is as follows;

    Please Login or Register  to view this content.
    lets say that the result;

    Please Login or Register  to view this content.
    means with a lot of blanks;
    one more thing plz, another code please or continue ur same code to let the result as follows;


    Please Login or Register  to view this content.
    Last edited by boss1982; 12-29-2012 at 11:53 AM.

  4. #4
    Registered User
    Join Date
    12-21-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    69

    Re: Macro to Copy Second Column in all sheets to new sheet

    made small changes in the watersev code, this should help
    Please Login or Register  to view this content.
    Hope this helps.
    Kiran

  5. #5
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    171

    Re: Macro to Copy Second Column in all sheets to new sheet

    thank you very much kiran, i know that i asked alot;

    after the code which you gave me (it was perfect), can u please give me continued code to delete all blanks rows then the filled one must be shift to up?

    thanks

  6. #6
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    171

    Re: Macro to Copy Second Column in all sheets to new sheet

    it is ok thanks

    i added

    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Macro to Copy Second Column in all sheets to new sheet

    add this before Application.ScreenUpdating = 1 in "test" code:

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    12-21-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    69

    Re: Macro to Copy Second Column in all sheets to new sheet

    Hope your problem solved!

  9. #9
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    171

    Re: Macro to Copy Second Column in all sheets to new sheet

    sure

    thank u all

  10. #10
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    171

    Re: Macro to Copy Second Column in all sheets to new sheet

    hi all

    please i need one more help, how to choose which column will be copied?, if i want for example to copy second column + third and fifth.

    this is the code for second column only;

    Please Login or Register  to view this content.
    thanks.

  11. #11
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    171

    Re: Macro to Copy Second Column in all sheets to new sheet

    any one can help plz?

  12. #12
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    171

    Re: Macro to Copy Second Column in all sheets to new sheet


+ 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