+ Reply to Thread
Results 1 to 5 of 5

Formula needed to look through accts and flag acct with most recent date

  1. #1
    Registered User
    Join Date
    07-24-2012
    Location
    Denver, CO
    MS-Off Ver
    Excel 2007
    Posts
    5

    Formula needed to look through accts and flag acct with most recent date

    Hello,

    I need to look through a list of account numbers and dates and determine which row has the most recent date for that account number. For example, I would need to flag the first and third rows with a '1' because the date associated with that record is the most recent, while rows 2 and 4 would need to be marked with a '0'.

    Acct # Date Most Recent
    12345 5/17/2013 1
    12345 5/15/2013 0
    54321 5/4/2013 1
    54321 5/1/2013 0

    So I need a formula that can look through a non-unique list of values and return a '1' for the value that contains the most recent date.
    Does this make sense?
    Thanks in advance!!
    Last edited by khauskins; 05-20-2013 at 11:11 AM. Reason: Fix title

  2. #2
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: Formula Help

    Hi khauskins,

    If 'Acct #' is in column A and 'Date Most Recent' is in column B, then in C2, try this array-formula... =IF(MAX(($A$2:$A$5=A2)*$B$2:$B$5)=B2,1,0)

    But instead of just ENTER, you have to use array-enter (CTRL-SHIFT-ENTER)... magical curly brackets will appear... copy this formula to the rest of the cells in column C...

    Let me know if you have any questions...

    Dennis

  3. #3
    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,049

    Re: Formula Help

    Hi and welcome to the forum

    We would love to help you with your question, but 1st, in accordance with forum rule, please rename your thread to something more meaningful, that actually describes your problem.

    Because thread titles are used in searching the forum it is vital they be written to accurately describe your thread content or overall objective using ONLY search friendly key words. That is, your title used as search terms would return relevant results.

    Also, many members will look at a thread title, and if it is of interest to them, or it falls within their area of expertese, they might only open those threads.

    Look at it this way...if you typed that title into google, what would you expect to get back?
    To change a Title on your post, click EDIT on you're 1st post, then Go Advanced and change your title
    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

  4. #4
    Registered User
    Join Date
    07-24-2012
    Location
    Denver, CO
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Formula Help

    Thanks Dennis, this worked like a charm. I appreciate the help!

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Formula Help

    khauskins,

    Please check post 3 too.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

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