max_date的Excel数组公式 [英] Excel array formula for max_date

查看:136
本文介绍了max_date的Excel数组公式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用数组公式:

I'm trying to use an array formula:

= MAX(IF(C2 <> 0,IF($ B $ 2:$ B $ 29600 = B2,$ A $ 2:$ A $ 29600),NA))

=MAX(IF(C2<>0,IF($B$2:$B$29600=B2,$A$2:$A$29600),NA))

在下面的数据集上(仅作为示例):

on below data set (just an example):

我在这里缺少的问题不仅是要根据特定ID对MAX日期进行分组(当不缺少收入时),而且要仅对收入高于0的情况显示此日期.
因此,在id ='x'的情况下,最大日期应为1/9/2019,因为这是存在任何收入的最后日期,而不是1/11/2019-这是最大日期但有0收入.

The issue here that I'm missing is not only to get MAX date groupped by specific ID (when revenue is not missing), but to have this date shown only for revenue higher than 0.
So in the case of id = 'x' max date should be 1/9/2019 as this is last date that had any revenue present, and not 1/11/2019 - this is max date but has 0 revenue.

我将不胜感激!

推荐答案

尝试一下:

=IF(C2<>0;MAX(IF($B$2:$B$17=B2;IF($C$2:$C$17=MAX(IF($B$2:$B$17=B2;$C$2:$C$17));$A$2:$A$17)));NA())

此公式是一个数组公式,因此必须将其插入 ENTER + SHIFT + CTRL

This formula is an array formula, so it must be inserted with ENTER+SHIFT+CTRL

我明白了:

重要提示:请注意,我的Excel是西班牙语,所以我的默认日期格式为dd/mm/yyyy,这说明了为什么公式和日期不是英语.

IMPORTANT: Please note my Excel is in spanish, so my default date format is dd/mm/yyyy and that explains why formulas and dates are not in english.

这篇关于max_date的Excel数组公式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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