+ Reply to Thread
Results 1 to 7 of 7

Calculating average time between orders (Gsheets)

  1. #1
    Registered User
    Join Date
    03-31-2021
    Location
    Netherlands
    MS-Off Ver
    Gsheets
    Posts
    3

    Calculating average time between orders (Gsheets)

    Hi all,

    I've been struggling with getting a formula for a couple days now. I've been trying to visualize the time it takes for a customer to place a 2nd order, and then a 3rd order, and so on. Now I'm not a complete noob with Gsheets, but I'm definitely not a pro either, so I could use a little help.

    - So what we have is a sheet with unique customer ID's in "A". Duplicates removed, so only the unique ID's.
    - Then all orders by customers in "N", so these are all of the orders placed. Customers appear multiple times when they placed multiple orders.
    - The date with each order in "O"
    - And the frequency of customer (how often we see a customer in "N") in P (probably not necessary for this function)


    I would love a function that searches for the given Customer ID from A, in row N, and gives the date of the 1st order in B, the 2nd order in C and the 3rd order in D (when multiple orders occur). I think it should be something with VLOOKUP but I can't seem to get it right. I've manually filled in the 1st column to give you an idea. The days between orders (G t/m J), I can handle.. ;-)


    Thanks a lot!
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,492

    Re: Calculating average time between orders (Gsheets)

    Welcome to the forum.

    Please change your forum profile from MS to Google Sheets. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,979

    Re: Calculating average time between orders (Gsheets)

    Assuming your data is sorted in date order, you could clear your current results, then put:

    =transpose(filter($O$2:$O,$N$2:$N=$A2))

    in B2 and copy down.
    Everyone who confuses correlation and causation ends up dead.

  4. #4
    Registered User
    Join Date
    03-31-2021
    Location
    Netherlands
    MS-Off Ver
    Gsheets
    Posts
    3

    Re: Calculating average time between orders (Gsheets)

    Ali, apologies - I've changed it :-)

    Rorya, Thanks for looking into it! My data is sorted in order of dates. But somehow I get an error (#ERROR!) back. Could you have any idea what the reason is behind this error?

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,979

    Re: Calculating average time between orders (Gsheets)

    Perhaps you need a semicolon instead of a comma in the formula?

  6. #6
    Registered User
    Join Date
    03-31-2021
    Location
    Netherlands
    MS-Off Ver
    Gsheets
    Posts
    3

    Re: Calculating average time between orders (Gsheets)

    Thanks Rorya, you nailed it! Cheers

  7. #7
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,979

    Re: Calculating average time between orders (Gsheets)

    Glad we could help.

+ 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. Replies: 7
    Last Post: 06-04-2020, 04:19 PM
  2. Replies: 4
    Last Post: 03-22-2020, 05:35 AM
  3. Calculating average wait time across time intervals
    By rjng90 in forum Excel General
    Replies: 7
    Last Post: 04-16-2016, 02:07 AM
  4. Calculating Average of Time
    By abhijit786 in forum Excel General
    Replies: 5
    Last Post: 05-05-2015, 02:46 PM
  5. Help calculating monthly orders depending on cumulative orders to date
    By nats2412 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 02-03-2015, 03:18 AM
  6. Replies: 3
    Last Post: 06-12-2014, 09:29 AM
  7. Replies: 2
    Last Post: 06-11-2014, 11:39 AM

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