数组公式和MAX [英] Array formula and MAX

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

问题描述

我试图从两列 A & 中获得峰值/最大净值B 与数组公式.我使用数组公式的原因是因为我不想将 MAX 作为一个单元格中的答案.我希望它使用每个新条目逐行自动更新,而不会覆盖以前的条目.到目前为止,我得到了这个公式,但它在每一行中都给出了相同的结果.

=ArrayFormula(if(AD3:AD="","",MAX("<="&row(AD3:AD),AD3:AD,AB2)))

为了澄清起见,我希望它看起来像这样:

 AB AD高峰关闭股权 股权1195 美元 1195 美元1195 美元 1090 美元1285 美元 1285 美元1285 美元 1180 美元1315 美元 1315 美元1315 美元 1210 美元1315 美元 1205 美元

现在有了上面的公式(它在 AB3 中),我在每一行中只得到 MAX,从 AB3 行开始,它是 1315 美元.

它还可以为 AD 列提供 MAX,以便它在每个新行和条目上更新.这是样本表.

I'm trying to get peak/max equity from two columns A & B with an array formula. The reason I use the array formula is because I don't want just MAX as an answer in one cell. I want it to update automatically row after row with each new entry without overwriting previous entry. So far I got to this formula, but it gives me the same result in each row.

=ArrayFormula(if(AD3:AD="","",MAX("<="&row(AD3:AD),AD3:AD,AB2)))

And for clarification I would like it to look something like this:

  AB       AD
PEAK     CLOSED
Equity   Equity
 $1195    $1195
 $1195    $1090
 $1285    $1285
 $1285    $1180
 $1315    $1315
 $1315    $1210
 $1315    $1205

And now with the above formula ( it's in AB3 ) I get just MAX in each row, starting with row AB3 which is $1315.

It can also just give me MAX for column AD, just so it updates on each new row and entry. And here's sample sheet. sample doc

Thank you.

解决方案

=ARRAYFORMULA(IF(A2:A>=B2:B, A2:A, B2:B))

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

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