如果条件为真,则返回Excel返回数组 [英] Excel Return Array if condition is true
本文介绍了如果条件为真,则返回Excel返回数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图获得一些效果,当我有一条if语句时:if({TRUE; FALSE; TRUE},{1,2,3})它将返回{1,3}一种通过条件数组获得此效果并返回结果数组的方法?
I am trying to get something of the effect that when I have an if statement: if({TRUE;FALSE;TRUE},{1,2,3}) it will return with {1,3} is there any way to get this effect with an array of conditions and return an array of results?
推荐答案
如果具有动态数组公式FILTER:
If one has the Dynamic Array Formula FILTER:
=FILTER({1,2,3},TRANSPOSE({TRUE;FALSE;TRUE}))
没有动态数组公式:
=TRANSPOSE(MODE.MULT(IF({TRUE;FALSE;TRUE},ROW(1:3)*{1,1})))
这是一个数组公式,取决于版本,在退出编辑模式时可能需要按Ctrl-Shift-Enter确认.
This is an array formula and depending on ones version, it may need to be confirmed with Ctrl-Shift-Enter when exiting edit mode.
这篇关于如果条件为真,则返回Excel返回数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文