+ Reply to Thread
Results 1 to 6 of 6

Loop through a folder copy and paste range to 1 workbook

  1. #1
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    110

    Exclamation Loop through a folder copy and paste range to 1 workbook

    I need a copy to loop through all files (.xls) in a folder then copy a range ("B11:P" & lastrow) and paste to 1 sheet.

    Goal is to compile all data in one Masterfile.

    The files in the folder will have the same format and tab names. I need the data from the tab/sheet named "Input"

    I currently unable to sensitise the sample data and unable to find a code in my research to get me started. any input will help so thank you in advance

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Loop through a folder copy and paste range to 1 workbook

    You did not specify a path or directory name, so it is assumed that the Master workbook will be in the same folder as the files and the Master workbook will host the code.
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    110

    Re: Loop through a folder copy and paste range to 1 workbook

    Thank you JLGWhiz!
    How do i paste as value only not copying the formula?

  4. #4
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Loop through a folder copy and paste range to 1 workbook

    change this
    Please Login or Register  to view this content.
    to this
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    110

    Re: Loop through a folder copy and paste range to 1 workbook

    Thank you!

  6. #6
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Loop through a folder copy and paste range to 1 workbook

    Just a note for anyone in the future coming across this Thread... It is continuede a bit here:
    http://www.excelforum.com/excel-prog...oop-a-sub.html
    '_- Google first, like this _ site:ExcelForum.com Gamut
    Use Code Tags: Highlight code; click on the # icon above,
    Post screenshots COPYABLE to a Spredsheet; NOT IMAGES PLEASE
    http://www.excelforum.com/the-water-...ml#post4109080
    https://app.box.com/s/gjpa8mk8ko4vkwcke3ig2w8z2wkfvrtv
    http://excelmatters.com/excel-forums/ ( Scrolll down to bottom )

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Loop through files in folder, copy range, Paste range to original workbook
    By knevil in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-09-2016, 05:33 PM
  2. Replies: 3
    Last Post: 10-17-2015, 02:05 PM
  3. Loop through each folder copy values from range in file1 to named range in file2
    By dafella in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-16-2015, 05:19 PM
  4. Copy a Range from each workbook in a folder to another folder
    By Romina in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-10-2015, 05:53 AM
  5. Replies: 1
    Last Post: 01-06-2015, 10:13 AM
  6. Copy a Range from each workbook in a folder to another folder
    By Romina in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-06-2015, 06:40 AM
  7. Loop through a folder and paste rows from a master workbook
    By amandae27 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-09-2013, 11:27 AM

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