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
    Junior Member
    Join Date
    Mar 2018
    Posts
    12
    Rep Power
    0
    Once Again Doc Elstein,

    Thank you very much for your input. I am sure this will save a lot of problems we are experiencing at our work.

    The date column L should have the date the macro was run on for the record's data that was copied.

    For Example in Raghu.xlsx, record with serial no.3 and 8 are not completed. When they are completed, the column L for these two records should have the date they were copied.

    In zMaster.xlsm, again the column L should have the date the records were copied.

    Hopefully, from Monday, we will have fewer problems thanks to your input and help.

    Regards
    Raghavendra

    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=314837#p314837
    https://www.eileenslounge.com/viewtopic.php?f=21&t=40701&p=314836#p314836
    https://www.eileenslounge.com/viewtopic.php?f=27&t=40621&p=314621#p314621
    https://www.eileenslounge.com/viewtopic.php?f=27&t=40621&p=314619#p314619
    https://www.eileenslounge.com/viewtopic.php?f=27&t=40621&p=314600#p314600
    https://www.eileenslounge.com/viewtopic.php?f=27&t=40621&p=314599#p314599
    https://www.eileenslounge.com/viewtopic.php?f=27&t=40621&p=314274#p314274
    https://www.eileenslounge.com/viewtopic.php?f=27&t=40621&p=314229#p314229
    https://www.eileenslounge.com/viewtopic.php?f=27&t=40621&p=314195#p314195
    https://www.eileenslounge.com/viewtopic.php?f=36&t=39706&p=314110#p314110
    https://www.eileenslounge.com/viewtopic.php?f=30&t=40597&p=314081#p314081
    https://www.eileenslounge.com/viewtopic.php?f=30&t=40597&p=314078#p314078
    https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=314062#p314062
    https://www.eileenslounge.com/viewtopic.php?f=30&t=40597&p=314054#p314054
    https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313971#p313971
    https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313909#p313909
    https://www.eileenslounge.com/viewtopic.php?f=27&t=40574&p=313879#p313879
    https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313859#p313859
    https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313855#p313855
    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    Last edited by DocAElstein; 03-02-2024 at 02:59 PM.

  2. #2
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    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.
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    KILL A MODERATOR!!

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
  •