+ Reply to Thread
Results 1 to 11 of 11

Find recent value by date

  1. #1
    Forum Contributor
    Join Date
    10-21-2012
    Location
    Ind
    MS-Off Ver
    Excel 2010
    Posts
    110

    Question Find recent value by date

    Hi, I am in trouble please help me. I have attached workbook for your reference. I have 4 columns that are A, B, C, D, E, and F. Columns A contain customer number (ID), Column B, C, D, E contains order details & column F contains order details. I need to find out which customer place order twice & take recent order. I know I can do it via auto filter or sorting data but when data is huge that time it’s hectic job. I would like to automate this. Some times what happens customer place 5 to 10 orders in & I need to take recent one. When I find recent order that time I delete old orders row. I need to this task very carefully because its customers orders. Request you to please advice on this.
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Find recent value by date

    Run the below code which will ask you to select the column from which the duplicates needs to be removed.

    Please Login or Register  to view this content.
    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    To run the Excel VBA code:
    1. Press Alt-F8 to open the macro list
    2. Select a macro in the list
    3. Click the Run button


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Contributor
    Join Date
    10-21-2012
    Location
    Ind
    MS-Off Ver
    Excel 2010
    Posts
    110

    Re: Find recent value by date

    Sixthsense Thanks for your reply. Its not working. Plz advise.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Find recent value by date

    Please explain what is going wrong when you run the code or what error is occurring?

  5. #5
    Forum Contributor
    Join Date
    10-21-2012
    Location
    Ind
    MS-Off Ver
    Excel 2010
    Posts
    110
    There is no errors while running code but it not populating correct output. Its deleting recent values data. Objective is find duplicate vales in column A after finding duplicate take only recent date value. Dates are there in column F. Plz advise

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Find recent value by date

    Oops... really sorry for it since I have not considered Column-A in my previous code.

    Try the below revised code...

    Please Login or Register  to view this content.

  7. #7
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Find recent value by date

    Sorry.. If i have misunderstood the question.. but i think.. you want to keep only the Recent date's order to keep.. and you want to skip / delete.. old order's..

    Try this..

    Please Login or Register  to view this content.
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  8. #8
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Find recent value by date

    test..
    My post is not updating in parent forum..

  9. #9
    Forum Contributor
    Join Date
    10-21-2012
    Location
    Ind
    MS-Off Ver
    Excel 2010
    Posts
    110

    Re: Find recent value by date

    Hi, error in micro but objective is not achived. Here is the sample output. It will goves you idea. Plz advise
    Attached Files Attached Files

  10. #10
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Find recent value by date

    Are you matching Two columns or single column for removing duplicate?

    For single column use post #2 code
    For Two columns use post #6 code

  11. #11
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Find recent value by date

    to keep only recent or Max of Date.. check post # 7..

  12. #12
    Forum Contributor
    Join Date
    10-21-2012
    Location
    Ind
    MS-Off Ver
    Excel 2010
    Posts
    110

    Re: Find recent value by date

    Thanks guys. You are master minds........god bless you

+ 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] Formula to Find the Most Recent Date, and Then Return the Corresponding Cell
    By bssol in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-26-2013, 04:12 AM
  2. [SOLVED] Find the summary of a cell connected to the most recent date.
    By tomsmith in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-10-2013, 11:28 AM
  3. [SOLVED] date function to find most recent order
    By floridasurfn in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-20-2006, 12:45 PM
  4. [SOLVED] Find most recent date
    By Andi Sea in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-08-2006, 07:10 PM
  5. Find most recent date in a row of dates
    By Trapp in forum Excel General
    Replies: 3
    Last Post: 02-22-2006, 10:40 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