+ Reply to Thread
Results 1 to 7 of 7

Copy data to master wb based on date criteria.

  1. #1
    Forum Contributor
    Join Date
    10-07-2013
    Location
    Wilts, England
    MS-Off Ver
    Excel 2013
    Posts
    100

    Copy data to master wb based on date criteria.

    Hi everyone,
    Any help or advice anyone can give me on this would be great.
    I am trying to create a delivery schedule workbook which is populated with data captured from my existing delivery note workbooks. I am attempting to based on the date stored in cell k7 of sheet 1 in my delivery note workbook, copy and paste the data to the corrosponding date tab on my master delivery workbook. The sheets are called Jan, Feb, March ect.

    I am attempting to copy the data from specified cells to the next available free row in my master.

    Date: K5 to A5
    Name: C8 to B5
    Order No: A14 to C5
    prod No: J8 to D5
    Carriage: J14 to F5
    Town: C10 to H5
    Schedule: J9 to I5
    Pallets C36 to J5
    Info: A 36 to K5

    The save as button code is:
    Please Login or Register  to view this content.
    I have looked high and low for some code that I could adapt to my needs but have not been successful. The only thing i have found doesn't have the functionality that I need and I don't have the knowledge to adapt it myself.

    Please Login or Register  to view this content.
    Many thanks for any help or advice given.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Copy data to master wb based on date criteria.

    So am I understanding correctly that the "Save As" code works fine, but you just need help with the "MoveData" code? Will the Delivery Schedule workbook be opened manually, or do you want the code to do that for you?

  3. #3
    Forum Contributor
    Join Date
    10-07-2013
    Location
    Wilts, England
    MS-Off Ver
    Excel 2013
    Posts
    100

    Re: Copy data to master wb based on date criteria.

    Hi, Thank you very much for responding. Yes you are totally correct, I just need help adding the "MoveData" code. The Delivery Schedule will be closed so ideally the code will do that.

  4. #4
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Copy data to master wb based on date criteria.

    I would recommend that you give names to the cells needed by the code (Delivery Date, Company, Prod Num, etc.). That will give you flexibility to adjust the layout in the future without affecting the code. The code below assumes this has been done, but you can adjust as needed. Also, the code set up to open the Delivery Schedule for you, but also will work if it is already open. Have fun!

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    10-07-2013
    Location
    Wilts, England
    MS-Off Ver
    Excel 2013
    Posts
    100

    Re: Copy data to master wb based on date criteria.

    Hi Thank you very much for getting back to me and the code looks great. There is only a small issue, the code trips up on the "Sheets(Mnth).Select". Tried tinkering around with it but it keeps getting stuck on that line. Many thanks again.

  6. #6
    Forum Contributor
    Join Date
    10-07-2013
    Location
    Wilts, England
    MS-Off Ver
    Excel 2013
    Posts
    100

    Re: Copy data to master wb based on date criteria.

    Massive apologies, I tried adding the code to a Before Close event and it didn't like that very much. However tried adding the code to a button and it works perfectly. Thank you very much for all your help!!

  7. #7
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Copy data to master wb based on date criteria.

    I'm glad it worked for you. You're very welcome!
    Acts 4:12
    Salvation is found in no one else, for there is no other name under heaven given to mankind by which we must be saved.

+ 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. Copy entire row from Master sheet based on two criteria
    By melispol44 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-06-2013, 08:07 PM
  2. Replies: 11
    Last Post: 05-12-2013, 11:30 AM
  3. Copy Rows From Two Sheets Into Master Based On Criteria
    By longstrider in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-28-2012, 05:17 PM
  4. Replicating data from master sheet based on 2 criteria
    By kate8301 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-22-2011, 07:10 AM
  5. Copy rows from master sheet to other sheets based on criteria
    By spikeysas in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-07-2011, 04:28 AM

Tags for this Thread

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