+ Reply to Thread
Results 1 to 2 of 2

Data set of people with multiple dates. VBA coding to remove all but most recent?

  1. #1
    Registered User
    Join Date
    09-11-2015
    Location
    Los Angeles, CA
    MS-Off Ver
    2013
    Posts
    1

    Data set of people with multiple dates. VBA coding to remove all but most recent?

    Hi all,

    The data set that I'm working with lists Employees by First name, last name, hire date and termination date (as well as a bunch of other unrelated columns). Essentially, the data represents Dates of Employment for all employees of my company. It is not uncommon for employees to be terminated (adding a record of a hire date and a termination date to the list) and then coming back at a later date (such that they now have two records. One for their first record of employment, and now they are hired again, so there are two records under the same person). Is there a VBA code that will sort the employees by name and remove the dates that are not the most current? Any help would be greatly appreciated. Thanks.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,861

    Re: Data set of people with multiple dates. VBA coding to remove all but most recent?

    See such short code - will do:
    Please Login or Register  to view this content.
    assuming you have date starting from A1 with names in A, lastnames in B and dates in H column (row 1 has headers).

    See sample file - Cells are color-coded to make it easier to notice what happens.
    Yellow are single entries. For other staff - intensive color is the most recent.
    Attached Files Attached Files
    Best Regards,

    Kaper

+ 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. Replies: 1
    Last Post: 06-14-2014, 02:01 AM
  2. Replies: 1
    Last Post: 04-29-2014, 09:06 PM
  3. VB code query multiple outlook accounts from excel to find out of office dates
    By mrzachballa in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-13-2013, 06:02 PM
  4. Summing product based off multiple dates and finding most recent
    By CWicklund in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-26-2012, 06:44 PM
  5. Replies: 3
    Last Post: 06-06-2012, 01:44 PM
  6. Compare multiple dates, can enumerate cell based on most recent date
    By Brian in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-09-2006, 06:10 PM
  7. Replies: 1
    Last Post: 05-08-2006, 06:55 PM

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