偏移,命名范围和数据验证 [英] Offset, named range and data validation

查看:121
本文介绍了偏移,命名范围和数据验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下公式:



= VERSCHUIVING($ AJ $ 9; 0; 0; $ AJ $ 17; 1) Offset($ AJ $ 9,0,0,$ AJ $ 17,1)英文



AJ9是一个垂直的选项列表的开始,AJ17是该列表的长度。



我在一个命名范围内使用它,并将其用于数据验证使用间接 fucntion。当我想从这个命名范围的列表中选择一个参数时,不会出现任何内容,而当输入间接公式时,它会将其评估为一个错误。我尝试使用 cmd + shit + enter 作为数组公式输入公式,它只显示单元格AJ9的值,而不是向下扩展到数组。



任何有关这项工作的建议(适用于mac)



编辑:



刚刚尝试在Windows版本,也没有成功。当我打开名称管理器并输入公式时,会显示正确选择的虚线。然而,当我打开数据验证时,它仍然评估为一个错误。



EDIT2:



如果我输入 = CriticalPractice (我的命名范围的名称)在单元格中,它突出显示单元格AJ9和AJ17。当我按Enter键,我得到 #VALUE!。如果我输入它作为数组公式,我得到单元格AJ9的值。

解决方案

动态定义的 名称和 INDIRECT 不允许在数据验证中。在这种情况下,您需要使用 EVALUATE ,尽管您应该注意到,尽管没有明确的VBA被调用,但是这仍然要求将工作簿保存为启用宏。 / p>

例如,假设单元格 AL7 包含文本,例如Name1,被解释为定义的名称,即 Name1 (其定义是您给出的 OFFSET 构造),然后是以下名称管理器中将另外定义:



名称: Name2
指: =评估($ AL $ 7)



之后数据验证列表可以通过使用列表选项并输入:



= Name2



关于

$ b $



b

I have the following formula:

=VERSCHUIVING($AJ$9;0;0;$AJ$17;1) or Offset($AJ$9,0,0,$AJ$17,1)in english

With AJ9 being the start of a vertical list of options, and AJ17 being the length of that list.

I use this in a named range and use it for data validation using the Indirect fucntion. When I want to select an argument from the list of this named range nothing appears, and when entering the Indirect formula it says it evaluates to an error. I tried entering the formula as an array formula using cmd + shit + enterand it only displayed the value of Cell AJ9 instead of expanding downwards to an array.

Any suggestions to make this work (on excel for mac)

EDIT:

Just tried on a windows version, also no succes. When I open the name manager and enter the formula there it does show the dotted lines around the correct selection. However when I turn on data validation it still evaluates to an error.

EDIT2:

If I enter =CriticalPractice(the name of my named range) in a cell it highlights cells AJ9 and AJ17. When I press enter I get #VALUE!. If I enter it as an array formula I get the value of cell AJ9.

解决方案

The combination of dynamically-defined Names and INDIRECT is not permitted within Data Validation. In such cases you need to employ EVALUATE, though you should note that, despite no explicit VBA being called, this will nevertheless require that the workbook be saved as macro-enabled.

For example, assuming cell AL7 contains the text, e.g. "Name1", which is to be interpreted as the Defined Name, i.e. Name1 (whose definition is the OFFSET construction you give), then the following additional definition would be made in Name Manager:

Name: Name2 Refers to: =EVALUATE($AL$7)

After which the Data Validation list can be obtained via using the List option and entering:

=Name2

in the Source box.

Regards

这篇关于偏移,命名范围和数据验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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