+ Reply to Thread
Results 1 to 10 of 10

Collating data from workbooks

  1. #1
    Registered User
    Join Date
    10-25-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2007
    Posts
    4

    Smile Collating data from workbooks

    can you please help me with a macro?

    I need a macro for collating the data from n workbooks (from 1st sheet only) to an existing workbook in single sheet.

    please help.

    Thanks
    Kamlesh.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Collating data from workbooks

    Do all the workbooks have the same headers?

    Are they all saved in 1 folder?

    Since you want the data to be populated in an existing workbook, do you want the data already present to be deleted and then fresh data collated? Or should the data be entered in the next available row?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    10-25-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Collating data from workbooks

    all WB have same headers, saved in single folder.

    need to delete old data and populate new.
    need to pull data from A14 to BAn (*last 11 rows of no need)
    to be pasted from column Dn to BDn
    Sort the data on column K.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Collating data from workbooks

    You mean data from A14 to BA (last row minus 11 rows) to be copied to the next available row in column D of the summary file?

  5. #5
    Registered User
    Join Date
    10-25-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Collating data from workbooks

    yes, you r right.

  6. #6
    Registered User
    Join Date
    10-25-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Collating data from workbooks

    one more thing, these files are downloaded from net, and giving an error before opening Error before opening the file.jpg need to click on Yes to open the file.

    If this is a lengthy task, you can gimme macro to collate data from all open files. Thank you!

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Collating data from workbooks

    The macro can disable those alerts for you. Its good you mentioned about it.

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Collating data from workbooks

    Try this code
    Please Login or Register  to view this content.
    Change the bold section to match your system.

    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose View | Macros
    Select a macro in the list, and click the Run button

  9. #9
    Registered User
    Join Date
    10-25-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Collating data from workbooks

    Solved... Thank you!

  10. #10
    Registered User
    Join Date
    10-27-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Collating data from workbooks

    Hi,

    In the above code, there is a specific range which is mentioned earlier. If i have a data range which is not fixed, how do i copy it. Currently i am selecting range using Ctrl + Shift + End. Can you suggest an updated code which will select the whole range in the sheet and past it in the worksheet. Thank you very much.

    VG

  11. #11
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Collating data from workbooks

    Vgothe,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.

+ 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