+ Reply to Thread
Results 1 to 6 of 6

Grouping and deleting data based on corresponding date values

  1. #1
    Registered User
    Join Date
    11-29-2012
    Location
    Teesside, England
    MS-Off Ver
    Excel 2010
    Posts
    7

    Grouping and deleting data based on corresponding date values

    We are planning a export some data from an old database to a new one. The old database has a function that was supposed to close a client's case and archive the record if there is no action on it for 180 days and no future contact planned. The problem we have faced is that this "automatic" facility requires you to manually access each clients record for it to apply the auto close and archive. I have exported the data I need from the old database but we have several hundred open case IDs who need to be deleted before we can import the data to a new system.

    I am wondering if it is possible to use excel to identify the client IDs with no contact for the previous 180 days and who have no contact planned for the next 180 days and to either highlight or delete all the unneeded rows from the spreadsheet

    I have attached an extract of the data set we are working with

    Thanks in advance for any assistance
    Attached Files Attached Files

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Grouping and deleting data based on corresponding date values

    This assumes that a future contact date would also be entered in column B.

    Please Login or Register  to view this content.
    Be sure to test this on a copy or mockup of your file, not the original.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Registered User
    Join Date
    11-29-2012
    Location
    Teesside, England
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Grouping and deleting data based on corresponding date values

    Hi
    Thanks JLGWhiz for the speedy reply but running the macro (which works perfectly BTW ), it looks like I have not explained myself properly in the OP.

    We are wanting to only identify clients that are classed as live - the definition being that they have had no contact in the past/next 180 days so I was looking at a technique to highlight (or delete) any client IDs and all their associated appointments if they do not fall within that defined parameter

    J

  4. #4
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Grouping and deleting data based on corresponding date values

    Here's a formula based solution.
    1. Copy the Client ID's in col-A to an unused column, say, col-D
    2. Select col-D then on the ribbon Data > Remove duplicates
    3. In E2 and copied down to cover all client IDs
    4. Formula: copy to clipboard
      Please Login or Register  to view this content.
    5. In F2 and copied down to cover all col-A entries:
    6. Formula: copy to clipboard
      Please Login or Register  to view this content.
    7. Any row in which this formula evaluates to "FALSE" can be deleted.

    See the attached workbook

    Let me know if this works for you.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    11-29-2012
    Location
    Teesside, England
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Grouping and deleting data based on corresponding date values

    Hi Geoff,

    Apologies that it has taken so long to get back to you. That works like a dream, mate and has already saved us a ton of time.

    Thanks!

    J
    Last edited by badgerboy13; 05-30-2019 at 09:38 AM.

  6. #6
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Grouping and deleting data based on corresponding date values

    Glad to hear it! Thanks for the feedback and reputation points.

+ 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. Grouping Rows Based on Values in Another Cell
    By tu.nguyenq512 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-06-2016, 12:25 AM
  2. Grouping rows based on 2 column values
    By anvilofstars in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-29-2015, 12:39 PM
  3. [SOLVED] Grouping Row Values Based On Set Criteria
    By RRa in forum Excel General
    Replies: 6
    Last Post: 06-21-2014, 05:21 AM
  4. Grouping rows based on common values
    By jfd456 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-26-2012, 06:31 AM
  5. Deleting data based on values in specific column
    By sgk18 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-09-2012, 05:06 AM
  6. Grouping rows based on column values and comparing row values
    By bernborough in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-27-2010, 10:18 AM
  7. Grouping all values based on a specific Minimum
    By eldwardo in forum Excel General
    Replies: 7
    Last Post: 11-12-2008, 01:28 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