+ Reply to Thread
Results 1 to 8 of 8

macro to copy specific data from many workbook to one workbook

  1. #1
    Registered User
    Join Date
    03-09-2008
    Posts
    4

    macro to copy specific data from many workbook to one workbook

    Dear All,

    I have a excelFile(File Attached)
    File contain following sheets
    1 Form
    2.File name
    3.Purchase
    4.Delayed Report

    File name sheet contain location or Path where File is store
    I need a macro to Do Following Action

    On running code Open first (Purchase1.xls)
    Find Delayed in Column F
    If F1=Delayed than copy that Row
    Paste entire row in Sheet Mention Delayed Report in Cell A2
    Search Next Cell in F Column
    if F2 not Equal to Delayed than leave
    Search Next Cell in F Column
    if F3 Equal to Delayed than Copy Entire Row
    Paste entire row in Sheet Mention Delayed Report in Cell A3
    Search Next Cell in F Column up to blank cell
    If Cell number if F65536 than close Purchase1
    Open Second File and Repate the proceess till end

    Anyone help onthis
    Thanks in Advance

    ANVESH
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: macro to copy specific data from many workbook to one workbook

    Adjust your C2 formula so that the path includes the closing "\" and then put all your Purchase??.xls files into that folder.

    Run this macro, it won't need FileName sheet, it will open every file in that folder with the correct name and pull in the data.
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    03-09-2008
    Posts
    4

    Re: macro to copy specific data from many workbook to one workbook

    Thanks J,

    Your code is nice and it run, but the files are Protected.
    On running code it give an Run Time Error 1004.

    Kindly Help

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: macro to copy specific data from many workbook to one workbook

    Please provide all the information regarding how they are protected. Sheets/Books/Password or not?

  5. #5
    Registered User
    Join Date
    03-09-2008
    Posts
    4

    Re: macro to copy specific data from many workbook to one workbook

    Hi J

    It is protected in following way
    Tools\Protection\Protect Sheet
    It is password protected for editing

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: macro to copy specific data from many workbook to one workbook

    Add the highlighted line of code where shown:
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-09-2008
    Posts
    4

    Re: macro to copy specific data from many workbook to one workbook

    Thanks Dear

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: macro to copy specific data from many workbook to one workbook

    If that takes care of your need, be sure to EDIT your original post, click on GO ADVANCED and set the PREFIX box to [Solved].

+ 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