+ Reply to Thread
Results 1 to 5 of 5

Macro moving records with termination dates to another workbook

  1. #1
    Registered User
    Join Date
    08-28-2013
    Location
    Phoenix, Arizona
    MS-Off Ver
    Excel 2010, 2013
    Posts
    69

    Macro moving records with termination dates to another workbook

    I have two workbooks. First is FakeCard, with active employees listed. Second is FakeTermed where employees with termination dates are transferred to.

    To keep FakeCard tidy, I would like the employees who have a termination date in the Employees tab moved to the Employees tab in the FakeTermed workbook, and the empty rows left by moving the records from FakeCard removed.

    Ideally, this would be after the HR person enters all the terminated employees and then clicks on the "PurgeTerms" button on bottom right of the Review tab. It is not likely the HR person would remember to open or close the FakeTermed workbook, so I would like the macro to open the FakeTermed workbook, transfer the data and then close the FakeTermed workbook.

    In the end, any employees with a termination date entered in FakeCard workbook, Employees tab will be moved to the FakeTermed workbook, Employee tab and then any empty rows in FakeCard workbook, Employees tab will be removed.

    I hope this is clear

    Thanks so much!

    FakeTerms.zipFakeCard.zip
    Last edited by jcaynes; 12-10-2013 at 04:23 PM. Reason: Add criteria

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro moving records with termination dates to another workbook

    Hi jcaynes

    It appears as if your "FakeTermed" Workbook is a copy of "FakeCards" Workbook...perhaps that was simply for this exercise.

    In "FakeTermed" clear all Formulas/Links from Sheet Employees. The Code assumes WorkBook "FakeCards"and "FakeTermed" are in the same Folder.

    Place the Code in a General Module of "FakeCards" and assign it to the Purge Terms Button on "FakeCards", Sheet Review. The Code will Open "FakeTermed" and Close/Save it when processing is finished. It takes a few seconds to run simply because of all the Code and Sheets you have in Book "FakeTermed"...if you don't need it trash it.
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    08-28-2013
    Location
    Phoenix, Arizona
    MS-Off Ver
    Excel 2010, 2013
    Posts
    69

    Re: Macro moving records with termination dates to another workbook

    Thanks so much! It worked perfectly! I really appreciate it and the help provided before!

  4. #4
    Registered User
    Join Date
    08-28-2013
    Location
    Phoenix, Arizona
    MS-Off Ver
    Excel 2010, 2013
    Posts
    69

    Re: Macro moving records with termination dates to another workbook

    I tried to give you some reputation, but I was prevented :/ I have to give others reputation first.

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro moving records with termination dates to another workbook

    You're welcome...glad I could help.

+ 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. macro to update another workbook with new or updated records
    By ecc34_11 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-21-2015, 06:28 AM
  2. [SOLVED] Excel Macro to Search records and copy to other workbook
    By Jovillanueva in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-11-2013, 12:42 AM
  3. Replies: 2
    Last Post: 05-30-2012, 10:53 AM
  4. moving all correct records into one sheet and wrong records into one sheet
    By ramserp in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-19-2009, 05:31 AM
  5. [SOLVED] moving a macro to a new workbook
    By KARomain in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-04-2006, 04:10 PM

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