非本机函数返回数组-如何显示输出 [英] Non-Native function returning an array - How to display the output

查看:35
本文介绍了非本机函数返回数组-如何显示输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果这是一个非常简单的问题,我深表歉意,但是我在这里有点茫然。

I apologise if this is a very simple question, but I am at a bit of a loss here.

我要使用的定制公式返回一个数组值,如下所示:

A bespoke formula I want to use returns an array of values, as seen here:

但是我找不到找到以单元格分隔格式显示此输出的方法,仅返回第一个单元格(39478)。

But I cannot find a way to present this output in a cell separated format, only the first cell (39478) is returned.

文档中包含注释:提示:此函数是多结果函数。您必须为输出设置一个数组。

虽然我知道我需要一个数组来显示多个结果,但我找不到执行该操作的方法所以。有提示吗?

Whilst I understand I am going to need an array to display multiple results, I cannot find the method of doing so. Any tips?

推荐答案

如果定制公式要返回值数组,则有一个将结果放入多个单元格的几种方法。

If the bespoke formula wants to return an array of values, there are a couple of ways to get the results into multiple cells.


  1. 将公式放入单元格并按Enter↵。接下来,选择该单元格及其下面的几个单元格。点击 F2 ,然后按 Ctrl + Shift + Enter↵。连续的值应填充所选的单元格,直到出现错误(不再返回)为止。

  1. Put the formula into a cell and hit Enter↵. Next, select that cell along with several cells below it. Tap F2 then hit Ctrl+Shift+Enter↵. The successive values should fill the cells selected until an error (no more returns) is reached.

将该公式放入单元格中,然后按 Ctrl + Shift + 输入↵。该公式应该用大括号括起来(例如 {} )。如果使用了正确的相对和绝对单元地址(例如 $ ** A $ 1 $ ** A1 等),则应该能够将公式填充,复制或向下拖动到连续的行中。

Put that formula into a cell and hit Ctrl+Shift+Enter↵. The formula should be wrapped in braces (e.g. { and }). If the correct relative and absolute cell addresses were used (e.g. $**A$1 or $**A1, etc) then you should be able to fill, copy or drag down the formula into successive rows.

使用 INDEX函数包含来自定制公式的返回值数组,并使用 row_num 参数。
= INDEX(<定制公式> ;, ROW(1:1))

Use an INDEX function to contain the array of returned values from the bespoke formula and peel off successive values using the row_num parameter.
      =INDEX(<bespoke formula>, ROW(1:1))
  Filled down.

迟早,您将用完所有行。 IFERROR函数用作包装器可以帮助避免显示错误。

Sooner or later, you will run out of rows to fill. An IFERROR function used as a wrapper can help avoid he display of errors.

如果要将所有值放入单个单元格,则可以定义用户定义的函数(也称为UDF)将该数组转换为单个字符串。通常不建议使用后一种方法,因为它会使值无法用于显示目的以外的其他用途。

If you want to put all of the values into a single cell, then a User defined Function (aka UDF) could concatenate the array into a single string. This last method is generally not recommended as it renders the values useless for anything other than display purposes.

Array公式需要使用 Ctrl + Shift + Enter↵完成。正确输入第一个单元格后,就可以像填充其他任何公式一样向下或向右填充或复制它们。

Array formulas need to be finalized with Ctrl+Shift+Enter↵. Once entered into the first cell correctly, they can be filled or copied down or right just like any other formula.

数组公式可以简化计算

请参见数组公式的准则和示例信息。

这篇关于非本机函数返回数组-如何显示输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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