+ Reply to Thread
Results 1 to 7 of 7

Formula or Pivot? Advice welcomed on how to achieve customer lifetime statistics

  1. #1
    Registered User
    Join Date
    11-05-2018
    Location
    Shepperton, England
    MS-Off Ver
    Office 365
    Posts
    32

    Formula or Pivot? Advice welcomed on how to achieve customer lifetime statistics

    Hi All,

    I have a spreadsheet with approx 15,000 individual invoice transactions, each row with a date, value and customer name.

    Using a pivot, I can easily work out a total lifetime value of each unique customer along with how many transactions that customer placed, but what I cannot figure out is how to calculate how long that customer has been with us?

    I am hoping, given that each transaction has a date, that I can somehow work out the length of time between the earliest date a customer has ordered, to the last date a customer has ordered.

    I just have no idea how!

    I attach a very small sample of the data here and would be most appreciative for advice.
    Many thanks
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Formula or Pivot? Advice welcomed on how to achieve customer lifetime statistics

    Not sure what output you want to see. But... Select column C.

    data/Data Tools/Text to Columns/Finish

    Then in M2, an array formula (in my version of Excel, anyway!!):

    =MAX(IF($E$2:$E$14=E2,$C$2:$C$14)-MIN(IF($E$2:$E$14=E2,$C$2:$C$14)))

    copied down.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Formula or Pivot? Advice welcomed on how to achieve customer lifetime statistics

    Non-array version:

    =AGGREGATE(14,6,$C$2:$C$14/($E$2:$E$14=E2),1)-AGGREGATE(15,6,$C$2:$C$14/($E$2:$E$14=E2),1)

  4. #4
    Registered User
    Join Date
    11-05-2018
    Location
    Shepperton, England
    MS-Off Ver
    Office 365
    Posts
    32

    Re: Formula or Pivot? Advice welcomed on how to achieve customer lifetime statistics

    Hi Guys,

    That's great, works perfectly, thanks for your help.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Formula or Pivot? Advice welcomed on how to achieve customer lifetime statistics

    Guys = Guy!!

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  6. #6
    Registered User
    Join Date
    11-05-2018
    Location
    Shepperton, England
    MS-Off Ver
    Office 365
    Posts
    32

    Re: Formula or Pivot? Advice welcomed on how to achieve customer lifetime statistics

    Sorry Glenn! I saw 2 posts and didn't spot they were both from you. Much appreciated! :o)

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Formula or Pivot? Advice welcomed on how to achieve customer lifetime statistics

    LoL. I don't think I'm schizophrenic. Are we??

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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 that can check for two criteria per customer when multiple customer lines exist
    By Macey351 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-05-2016, 10:11 AM
  2. Replies: 4
    Last Post: 11-28-2014, 07:53 AM
  3. Replies: 2
    Last Post: 08-20-2013, 08:36 AM
  4. [SOLVED] Heat Map Macro Works But is Crude... Improvements Welcomed!
    By chrisdlines in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-10-2012, 01:13 PM
  5. Replies: 1
    Last Post: 07-20-2012, 06:55 AM
  6. Formula nightmare!!! All help/suggestions welcomed
    By COLIN ROSNAB in forum Excel General
    Replies: 3
    Last Post: 03-14-2012, 11:24 AM
  7. Replies: 0
    Last Post: 04-08-2009, 08:51 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