excel,如何显示单个单元格中一系列单元格的阵列公式/值的结果

发布于 2025-02-03 23:54:35 字数 1285 浏览 2 评论 0原文

序言:我正在使用Excel 2016 **

我有一个数组公式,它正在通过数据集进行搜索,以最终找到基于多个标准的值的列表(因此具有动态长度,因此是偏移公式)(因此大批)。

该公式效果很好并返回我的期望,我的问题更多是我如何清楚地显示它。

{=OFFSET('Fitment Lists'!$C$5,1,MATCH(1,(($DH$8='Fitment Lists'!$C$2:$MIN$2)*($DI$8='Fitment Lists'!$C$3:$MIN$3)*($DK$7='Fitment Lists'!$C$4:$MIN$4)),0)-1,COUNTA(OFFSET('Fitment Lists'!$C$5,1,MATCH(1,(($DH$8='Fitment Lists'!$C$2:$MIN$2)*($DI$8='Fitment Lists'!$C$3:$MIN$3)*($DK$7='Fitment Lists'!$C$4:$MIN$4)),0)-1,50)),1)}

解决后,公式将返回以下从单列找到的列表,

{"result 1";"result 2";"result 3";"result 4";"result 5";"result 6";"result 7";"result 8"}

以我通常使用这样的公式的方式,就是给我一个动态的下拉列表,该列表将允许所有值显示在列表中。但是,我正在尝试简短摘要,并希望从单个单元格或指定范围内显示的这8或N结果。

目前,仅显示进入单元格时的第一个结果(如预期)。

我知道,在365中,您可以将阵列公式溢出到编写公式下的单元格中,但我不确定如何在Excel 2016中(或者如果可能的话)制作此

作品我想在这里实现,

排#colA
1结果1'公式在这里输入
2结果2
3结果3结果
4结果4
5结果5
6结果6
7结果7
8结果8

如果有人有任何见解,我会非常非常感谢。

谢谢,

Preface: I'm using Excel 2016**

I've got an array formula that is searching through a data set to ultimately find a list (with a dynamic length, hence the offset formula) of values based off of several criteria (hence the array).

The formula works fine and returns what I expect, my issue is more of how I can clearly display it.

{=OFFSET('Fitment Lists'!$C$5,1,MATCH(1,(($DH$8='Fitment Lists'!$C$2:$MIN$2)*($DI$8='Fitment Lists'!$C$3:$MIN$3)*($DK$7='Fitment Lists'!$C$4:$MIN$4)),0)-1,COUNTA(OFFSET('Fitment Lists'!$C$5,1,MATCH(1,(($DH$8='Fitment Lists'!$C$2:$MIN$2)*($DI$8='Fitment Lists'!$C$3:$MIN$3)*($DK$7='Fitment Lists'!$C$4:$MIN$4)),0)-1,50)),1)}

When solved the formula will return the following list found from a single column

{"result 1";"result 2";"result 3";"result 4";"result 5";"result 6";"result 7";"result 8"}

The way I normally use a formula like this is to give me a dynamic drop down list which would allow all of the values to be displayed in the list. However I'm trying to make a quick summary and would like to have these 8 or n results from the formula displayed in a single cell or in a specified range.

At the moment it's only displaying the first result (as expected) when entered in a cell.

I'm aware that in 365 you can have an array formula spill over into the cells under where the formula is written but I'm not sure of how to make this work in Excel 2016 (or if it's even possible)

The below is what I'm looking to achieve here,

Row #Col A
1Result 1 ' Formula entered here
2Result 2
3Result 3
4Result 4
5Result 5
6Result 6
7Result 7
8Result 8

If anyone has any insight I'd be very appreciative.

Thanks,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

硬不硬你别怂 2025-02-10 23:54:35

在动态阵列之前:要返回一个公式中的多个结果,您需要选择要包含结果的所有单元格,请在公式栏中键入公式,然后使用Control-Shit-Enter来创建数组公式。但是结果是一个静态数组,而不是动态的,因此您通常需要将其输入比实际所需的更多单元格。多余的单元格被#N/A填充,因此通常您会将公式包裹在IfError中。

Before Dynamic Arrays: to return multiple results from a formula you need to select all the cells you want to contain the results, type the formula in the formula bar and then use Control-Shit-Enter to create the array formula. But the result is a static array, not dynamic, so you usually need to enter it into more cells than you actually need. The excess cells get filled with #N/A so usually you would wrap the formula in an IFERROR.

爱的故事 2025-02-10 23:54:35

我想到了替代解决方案,而不是使用应用于一系列单元格的阵列公式。

由于我在IfError遇到该方法方面遇到麻烦,但下面的测试对其中有多少行具有数据,其中有多少行与当前行复制的当前行。

Rows($A$1:A1)>(COUNTA(OFFSET('Fitment Lists'!$C4,1,MATCH(1,(($DH$8='Fitment Lists'!$C$2:$MIN$2)*($DI$8='Fitment Lists'!$C$3:$MIN$3)*($DK$7='Fitment Lists'!$C$4:$MIN$4)),0)-1,50))) 

之后,我只是将偏移中的参考设置为仅对于列引用绝对是绝对的,因此当复制下来时,它将返回下一个行值。在下面看到的是“'Fitment Lists'!$ C4”

,OFFSET('Fitment Lists'!$C4,1,MATCH(1,(($DH$8='Fitmen...

原始公式

{=OFFSET('Fitment Lists'!$C$5,1,MATCH(1,(($DH$8='Fitment Lists'!$C$2:$MIN$2)*($DI$8='Fitment Lists'!$C$3:$MIN$3)*($DK$7='Fitment Lists'!$C$4:$MIN$4)),0)-1,COUNTA(OFFSET('Fitment Lists'!$C$5,1,MATCH(1,(($DH$8='Fitment Lists'!$C$2:$MIN$2)*($DI$8='Fitment Lists'!$C$3:$MIN$3)*($DK$7='Fitment Lists'!$C$4:$MIN$4)),0)-1,50)),1)}

更新公式(复制的阵列)

=IF(ROWS($DO$8:$DO8)>(COUNTA(OFFSET('Fitment Lists'!$C$4,1,MATCH(1,(($DH$8='Fitment Lists'!$C$2:$MIN$2)*($DI$8='Fitment Lists'!$C$3:$MIN$3)*($DK$7='Fitment Lists'!$C$4:$MIN$4)),0)-1,50))),"",OFFSET('Fitment Lists'!$C4,1,MATCH(1,(($DH$8='Fitment Lists'!$C$2:$MIN$2)*($DI$8='Fitment Lists'!$C$3:$MIN$3)*($DK$7='Fitment Lists'!$C$4:$MIN$4)),0)-1,COUNTA(OFFSET('Fitment Lists'!$C4,1,MATCH(1,(($DH$8='Fitment Lists'!$C$2:$MIN$2)*($DI$8='Fitment Lists'!$C$3:$MIN$3)*($DK$7='Fitment Lists'!$C$4:$MIN$4)),0)-1,50)),1))

感谢您@Charles Williams帮助我以新的方式帮助我考虑了这个问题。

I thought of an alternate solution instead of using an array formula applied to a range of cells.

As I was having trouble with IFERROR for that method still leaving behind some #N/A values, the below tests for how many rows have data in them against the current row copied down.

Rows($A$1:A1)>(COUNTA(OFFSET('Fitment Lists'!$C4,1,MATCH(1,(($DH$8='Fitment Lists'!$C$2:$MIN$2)*($DI$8='Fitment Lists'!$C$3:$MIN$3)*($DK$7='Fitment Lists'!$C$4:$MIN$4)),0)-1,50))) 

After that I just set the reference in the Offset to only be absolute to for the column reference so that when copied down it would return the next row value. Seen below with "'Fitment Lists'!$C4"

,OFFSET('Fitment Lists'!$C4,1,MATCH(1,(($DH$8='Fitmen...

Original formula

{=OFFSET('Fitment Lists'!$C$5,1,MATCH(1,(($DH$8='Fitment Lists'!$C$2:$MIN$2)*($DI$8='Fitment Lists'!$C$3:$MIN$3)*($DK$7='Fitment Lists'!$C$4:$MIN$4)),0)-1,COUNTA(OFFSET('Fitment Lists'!$C$5,1,MATCH(1,(($DH$8='Fitment Lists'!$C$2:$MIN$2)*($DI$8='Fitment Lists'!$C$3:$MIN$3)*($DK$7='Fitment Lists'!$C$4:$MIN$4)),0)-1,50)),1)}

Updated formula (Array copied down)

=IF(ROWS($DO$8:$DO8)>(COUNTA(OFFSET('Fitment Lists'!$C$4,1,MATCH(1,(($DH$8='Fitment Lists'!$C$2:$MIN$2)*($DI$8='Fitment Lists'!$C$3:$MIN$3)*($DK$7='Fitment Lists'!$C$4:$MIN$4)),0)-1,50))),"",OFFSET('Fitment Lists'!$C4,1,MATCH(1,(($DH$8='Fitment Lists'!$C$2:$MIN$2)*($DI$8='Fitment Lists'!$C$3:$MIN$3)*($DK$7='Fitment Lists'!$C$4:$MIN$4)),0)-1,COUNTA(OFFSET('Fitment Lists'!$C4,1,MATCH(1,(($DH$8='Fitment Lists'!$C$2:$MIN$2)*($DI$8='Fitment Lists'!$C$3:$MIN$3)*($DK$7='Fitment Lists'!$C$4:$MIN$4)),0)-1,50)),1))

Thank you @Charles Williams for helping me think about this problem in a new way.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文