Results 1 to 5 of 5

Keep last records based on conditions, VBA or formula

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    10-21-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    513

    Keep last records based on conditions, VBA or formula

    Hi there,

    I have a simple test file that I am trying to put a formula in to run, but i have not been successful. I have attached the file.

    Basically, here is what I want to do:

    1) Going down each record in column A, if the same patient(if patient ID is the same, then it's the same patient) has the same intake date. If the intake date is the same, but the admission date is different, then I ONLY want the first occurrence of the record and delete the other ones.
    2) Looking at each patient ID in column A. If the same patient has the different intake date, but their admission date is the same, then I want ONLY the last occurrence of the record and delete the other ones.

    I was trying to use a formula for it to work, but I have not been successful. It seems that I am always half way there.

    Any help is appreciated.

    Thanks
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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