Results 1 to 10 of 16

Thread: Copy data from Unique files into Masterfile all the files in the same folder.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    Hi Raghavendra,
    Quote Originally Posted by RaghavendraPrabhu View Post
    ...I am sure this will save a lot of problems we are experiencing at our work.
    we will have fewer problems thanks to your input and help.
    I think often automaton helps keep things in order and correct, which is an extra Bonus to the saving of time which it should also give
    _._____________________________________________---

    Quote Originally Posted by RaghavendraPrabhu View Post
    ..The date column L should have the date the macro was run on for the record's data that was copied.
    In zMaster.xlsm, again the column L should have the date the records were copied...
    I expected It was something like that.

    My last code attempt may not be the most efficient as , as far as I know, it is not possible to write information to a closed file, so it would be necessary to open the data files to add the data in column L in the data files anyway.

    But for now I will just modify the existing code.
    Towards the start of the Looping through the data workbooks the data files are now opened.
    The closed workbook references will still work even with the workbook open, so the same data is copied across.
    The updated date information is included now in the master Workbook and the data workbooks.

    So for example , I ran the latest code today, ( the 24th March ) , using the data files supplied in Post #1


    Master Worksheet:
    The master worksheet after running the code to merge data into it from the data worksheets, looks like this here:
    http://www.excelfox.com/forum/showth...0576#post10576

    Data worksheet example, ( For Workbook “Ravi.xlsx” , first worksheet)
    Here is the data worksheet Before the code runs

    Row\Col
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    M
    N
    1
    S No
    Item
    Price
    Qty
    Total
    Date Distributed
    Task1
    Task2
    Task3
    Task4
    Date Tasks Completed
    Date Consolidated
    Comments
    Team Member
    2
    26
    A2
    $ 35.00
    8
    $ 280.00
    17. Mrz 18
    Done N/A Done N/A
    17. Mrz 18
    Ravi
    3
    27
    A6
    $ 78.00
    63
    $ 4,914.00
    17. Mrz 18
    Done N/A Done N/A
    17. Mrz 18
    Ravi
    4
    28
    B2
    $ 11.00
    47
    $ 517.00
    17. Mrz 18
    N/A Done N/A Done
    17. Mrz 18
    Ravi
    5
    29
    B6
    $ 96.00
    8
    $ 768.00
    18. Mrz 18
    Need more information Ravi
    6
    30
    C2
    $ 74.00
    63
    $ 4,662.00
    18. Mrz 18
    Need more information Ravi
    7
    31
    C6
    $ 365.00
    47
    $ 17,155.00
    20. Mrz 18
    Need more information Ravi
    8
    32
    D2
    $ 33.00
    8
    $ 264.00
    20. Mrz 18
    N/A Done N/A Done
    20. Mrz 18
    Ravi
    9
    33
    D6
    $ 55.00
    63
    $ 3,465.00
    22. Mrz 18
    Done N/A Done N/A
    22. Mrz 18
    Ravi
    10
    Worksheet: Sheet1

    Here the same worksheet After the code has run

    Row\Col
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    M
    N
    1
    S No
    Item
    Price
    Qty
    Total
    Date Distributed
    Task1
    Task2
    Task3
    Task4
    Date Tasks Completed
    Date Consolidated
    Comments
    Team Member
    2
    26
    A2
    $ 35.00
    8
    $ 280.00
    17. Mrz 18
    Done N/A Done N/A
    17. Mrz 18
    24.Mrz 18
    Ravi
    3
    27
    A6
    $ 78.00
    63
    $ 4,914.00
    17. Mrz 18
    Done N/A Done N/A
    17. Mrz 18
    24.Mrz 18
    Ravi
    4
    28
    B2
    $ 11.00
    47
    $ 517.00
    17. Mrz 18
    N/A Done N/A Done
    17. Mrz 18
    24.Mrz 18
    Ravi
    5
    29
    B6
    $ 96.00
    8
    $ 768.00
    18. Mrz 18
    Need more information Ravi
    6
    30
    C2
    $ 74.00
    63
    $ 4,662.00
    18. Mrz 18
    Need more information Ravi
    7
    31
    C6
    $ 365.00
    47
    $ 17,155.00
    20. Mrz 18
    Need more information Ravi
    8
    32
    D2
    $ 33.00
    8
    $ 264.00
    20. Mrz 18
    N/A Done N/A Done
    20. Mrz 18
    24.Mrz 18
    Ravi
    9
    33
    D6
    $ 55.00
    63
    $ 3,465.00
    22. Mrz 18
    Done N/A Done N/A
    22. Mrz 18
    24.Mrz 18
    Ravi
    10
    Worksheet: Sheet1

    Here the code:
    http://www.excelfox.com/forum/showth...0577#post10577


    Alan
    Last edited by DocAElstein; 03-24-2018 at 09:42 PM.

Similar Threads

  1. Replies: 7
    Last Post: 03-23-2018, 02:02 PM
  2. Replies: 2
    Last Post: 03-09-2015, 11:26 PM
  3. Code to open up files in folder and sub-folder
    By Howardc in forum Excel Help
    Replies: 7
    Last Post: 08-26-2014, 07:01 AM
  4. Replies: 15
    Last Post: 08-23-2013, 12:03 PM
  5. Macro to copy data from a set of excel files
    By Sreejesh Menon in forum Excel Help
    Replies: 5
    Last Post: 11-15-2012, 11:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •