+ Reply to Thread
Results 1 to 5 of 5

Finding the latest transaction date by list of unique customer ID

  1. #1
    Registered User
    Join Date
    01-01-2012
    Location
    Kuala Lumpur
    MS-Off Ver
    Excel 2007
    Posts
    3

    Finding the latest transaction date by list of unique customer ID

    Hi,

    I've been sleeping on it for almost a week, unable to find solution..
    I am automating transaction dates' record. As per below, in Column A I have unique customer ID; in Column B I have transaction date; and in column C must appear last transaction date.

    (A) (B) (C)
    (Cust ID) (Transaction Date) (Last Transaction Date)
    (1) 1234 01/12/2011 New Customer
    (2) 1235 02/12/2011 New Customer
    (3) 1236 03/12/2011 New Customer
    (4) 1237 04/12/2011 New Customer
    (5) 1234 05/12/2011 01/12/2011
    (6) 1235 06/12/2011 02/12/2011
    (7) 1234 07/12/2011 05/12/2011
    (8) 1236 08/12/2011 03/12/2011
    (9) 1235 09/12/2011 06/12/2011
    (10) 1236 09/12/2011 08/12/2011


    Need help to create formula in Column C that meet following objectives:
    - if new cust ID, "New Customer" to appear
    - for existing customer, last transaction date will appear.

    Thank you in advance.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Re: Finding the latest transaction date by list of unique customer ID

    Try this:

    =IF(COUNTIF(B$2:B2, B2)>1, LOOKUP(2, 1/(B$1:B1=B2), C$1:C1), "New customer")

    B column is ID
    C column are dates

  3. #3
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Finding the latest transaction date by list of unique customer ID

    The following formula works for me:

    =IF(B1=MIN(INDEX(IF($A$1:$A$10=A1,$B$1:$B$10),0)),"New customer",MIN(INDEX(IF($A$1:$A$10=A1,$B$1:$B$10),0)))

    This is an array formula, so you must enter it with Ctrl-Shift-Enter, not just enter.

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Finding the latest transaction date by list of unique customer ID

    Hi Zainij,

    See the attached workbook where I have transformed your description alongwith the solution. Let us know if this solves your purpose. Thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Attached Files Attached Files
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  5. #5
    Registered User
    Join Date
    01-01-2012
    Location
    Kuala Lumpur
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Finding the latest transaction date by list of unique customer ID

    Dear Zbor, Andrew-R and DILIPandey,

    I really appreciate your help. All proposed solutions works well for my purpose.
    I added =IF(C12<>0, IF(COUNTIF(C$2:C12, C12)>1, LOOKUP(2, 1/(C$1:C11=C12), D$1:D11), "New customer"),"-") into Zbor's solution to make the template look neater for future data entry.
    Thank you all sifus, I will forward this template to all my 6 branch offices and they will start using it in five hours..
    Happy New Year.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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