Array formula and MAX

依然范特西╮ 提交于 2019-12-13 08:56:27

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/54774699/array-formula-and-max

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!