+ Reply to Thread
Results 1 to 5 of 5

Segregating entries by date and then by smallest/largest purchase

  1. #1
    Registered User
    Join Date
    08-06-2015
    Location
    Windsor, ON
    MS-Off Ver
    Professional Plus 2010
    Posts
    3

    Segregating entries by date and then by smallest/largest purchase

    I was given a database of records with their name, phone number, date of their last purchase and the amount of the purchase. There are many duplicates.

    I need to isolate those records that are 0-2 years from last purchase and 2+ yrs from last purchase. If the phone number appears in duplicate for both time frames, we want to mark for deletion those that are 2+ years old since technically they are more recent purchases made.

    Once that is done, I need to determine if the record appears more than once for the time frame, that I mark only the highest purchase amount, as the file will be reduced in size to only those who spent over X number of dollars.

    So, for example,

    John Smith 222-545-5555 07/28/13 $125
    John Smith 222-545-5555 04/17/15 $600
    John Smith 222-545-5555 06/30/15 $125
    John Smith 222-545-5555 07/22/15 $85

    John smith bought 3 times in 2015 and once in 2013. I want to mark his record from 2013 for deletion (without actually deleting it) because he's not a 'old' client, he's bought more recently.

    Then of the 3 entries in 2015, I want to either mark for deletion the lower 2 amounts or mark the highest amount. Whichever is easier. That way the only record that I'll have left at the end is John Smith 222-545-5555 04/17/15 $600 because that is the most he spent, so if the client asks me to delete all records below $500, John smith will still be in the list.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,044

    Re: Segregating entries by date and then by smallest/largest purchase

    Hi, welcome to the forum

    John smith bought 3 times in 2015 and once in 2013. I want to mark his record from 2013 for deletion (without actually deleting it) because he's not a 'old' client, he's bought more recently.
    There is a flaw in that reasoning. If the 7/28/2013 date was not there, you would "delete" 4/17/2015. Or, if there was a 7/29/2013, would you delete that too?
    What defines (ecactly) what does or does not get deleted ? (They are all within the 2-year cut-off)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    08-06-2015
    Location
    Windsor, ON
    MS-Off Ver
    Professional Plus 2010
    Posts
    3

    Re: Segregating entries by date and then by smallest/largest purchase

    I am trying to isolate records in such a manner that:

    anyone who has not bought for 2+ years (old custmer) is in a separate sheet from those who have bought in 0-2 years (current customer).

    I do not want to call someone and say hey old customer and then down the road call the same person and say, hey current customer. I also do not want duplicates within each file so I'm not calling someone twice (hey current customer) on one day and a week later calling them again because they have more than one purchase record.

    once that is cleaned up, it may be 10K records. The client has only paid for me to call 5K so they want me then to sort it by largest purchase made and only call the top 5K purchasers for that date range (current) as well as top 5K purchasers for (old clients)


    We are offering old customer something different on the call than we are current customers and if the client is paying for X number of calls they don't want me calling John Smith twice as a current customer, once because he bought for 200$ and again for $125. and then calling him a 3rd time if his name appears on the old customer list and offering him something different.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,044

    Re: Segregating entries by date and then by smallest/largest purchase

    So, you want a list of unique callers within the past 2 years, and then you want that list prioritized from highest to lowest value?

    Do you have a sample workbook I can work on?

  5. #5
    Registered User
    Join Date
    08-06-2015
    Location
    Windsor, ON
    MS-Off Ver
    Professional Plus 2010
    Posts
    3

    Re: Segregating entries by date and then by smallest/largest purchase

    I am attaching a sample file.

    In this instance, the customer bought in 2013 several times, 2014 and 2015.

    because they bought in 2014 and 2015, they fall into the 0-2 yr category and not 2+ year.

    I want to eliminate all records except the highest sale amount within the 0-2 yr records.

    In this case it would be $120 from 2014.
    Attached Files Attached Files

+ 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. [SOLVED] Smallest and largest value problem
    By ofd2008 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-14-2014, 04:10 AM
  2. Sort largest to smallest - VBA
    By Ricardo Mass in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2013, 09:05 AM
  3. 3 largest qty and 3 smallest
    By geng in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-09-2010, 12:20 AM
  4. % of difference between smallest and largest #s in a range
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-06-2010, 08:03 AM
  5. Largest and smallest sequences
    By smileyc in forum Excel General
    Replies: 8
    Last Post: 01-13-2009, 10:46 AM
  6. Sorting Largest To Smallest
    By all4excel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-24-2007, 10:30 PM
  7. [SOLVED] Ranking cells largest to smallest
    By jim314 in forum Excel General
    Replies: 1
    Last Post: 01-10-2005, 05:06 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