在所有订单列表中查找每个客户的第二个订单日期 [英] Find each customer's second order date in a list of all orders

查看:137
本文介绍了在所有订单列表中查找每个客户的第二个订单日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个时间范围内所有订单的列表,我试图计算每个客户的第一订单和第二订单之间的差额.我在另一个标签上有一个唯一的客户ID列表,并且每个订单都有第一笔订单日期.我需要一种方法来获取对应于每个客户ID的第二笔订单的日期.

I have a list of all orders placed in a time range and I am trying to calculate the difference between each customer's first and second order. I have a list of unique customer IDs on another tab and I already have the first order date for each. I need a way to grab the date of the second order, corresponding to each customer ID.

在下面的示例数据中,此公式对于客户ID"153950"的正确输出为"5/11/17 8:41".

In the sample data below, the correct output of this formula for customer ID "153950" would be "5/11/17 8:41".

推荐答案

使用AGGREGATE()

Use AGGREGATE()

=AGGREGATE(15,6,Sheet1!C1:C4/(Sheet1!A1:A4 = 153950),2)

,2正在获取第二小的日期.

The ,2 is grabbing the second smallest date.

这篇关于在所有订单列表中查找每个客户的第二个订单日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆