+ Reply to Thread
Results 1 to 5 of 5

copying data from Multiple worksheets

  1. #1
    Registered User
    Join Date
    12-11-2012
    Location
    Cairo, Egypt
    MS-Off Ver
    Excel 2010
    Posts
    3

    copying data from Multiple worksheets

    Hi guys,

    I noticed that there is allot of post's with similar issues as the one I am faceing but I could not figure out an answer from these post's this is why I am creating a new one.

    I have 500 files that I need to run the same code on all of them , the files are named 1.htm, 2.htm, 3.htm...... all the way to 500.htm

    the 1st file that the code will run on will be different as it will be placing the data in cells A2,B2,C2 the rest of the files it will look for the 1st empty cell in those columns and paste the data, I have created the below macro and it is exactly what I need but I need to find a way to loop the second part (starting from when I open the file 2.htm) without having to copy paste and edite the macro 500 times.

    The Data.xlsb file will be the file containing all the data in it


    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    935

    Re: copying data from Multiple worksheets

    Something like this should work for you, just divide and fit in your macro:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-11-2012
    Location
    Cairo, Egypt
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: copying data from Multiple worksheets

    Actually I just finished the Macro , thanks for the help anyway, the below code works perfectly for me , I even added a message box to trigger another Macro in the end if clicked yes but removed it from the below code to avoid confusion

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    935

    Re: copying data from Multiple worksheets

    Glad you got it working .

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: copying data from Multiple worksheets

    Here's another - a directory run style:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

+ 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