Excel 2010:如何在验证列表中使用自动填充 [英] Excel 2010: how to use autocomplete in validation list
问题描述
我正在使用一个大的验证列表,其中一些vlookup()函数依赖于此。这个列表越来越大。有没有办法键入我正在寻找的列表项目的第一个字母,而不是手动向下滚动搜索该项目的列表?
I'm using a large validation list on which a couple of vlookup() functions depend. This list is getting larger and larger. Is there a way to type the first letters of the list item I'm looking for, instead of manually scrolling down the list searching for the item?
我已经完成一些谷歌搜索,但这表明这是可能的早期版本的Excel,但不是在Excel 2010希望你们可以帮助。
I've done some Googling but this suggests that this is indeed possible in earlier versions of Excel, but not in Excel 2010. Hope you guys can help.
谢谢。
推荐答案
这是一个非常好的方法来处理(发现在 ozgrid ):
Here is a very good way to handle this (found on ozgrid):
在 Sheet1
A1
输入 = Sheet2!A1
并根据需要复制包括多余备用行(总共300行)。隐藏这些行,并使用这个公式参考:对于名为MyList的动态命名范围:
On Sheet1
A1
Enter =Sheet2!A1
and copy down including as many spare rows as needed (say 300 rows total). Hide these rows and use this formula in the Refers to: for a dynamic named range called MyList:
=OFFSET(Sheet1!$A$1,0,0,MATCH("*",Sheet1!$A$1:$A$300,-1),1)
现在在最后一个隐藏行下方的单元格中使用数据验证和列表源使用 = MyList
Now in the cell immediately below the last hidden row use Data Validation and for the List Source use =MyList
适用于Excel 2007+的版本(在2010年无法测试,但AFAIK,版本没有任何真正的特定)。
假设您的数据源位于 Sheet2!A1:A300
,我们假设您的验证列表(也称为 autocomplete )在单元格 Sheet1!A1
。
Adapted version for Excel 2007+ (couldn't test on 2010 though but AFAIK, there is nothing really specific to a version).
Let's say your data source is on Sheet2!A1:A300
and let's assume your validation list (aka autocomplete) is on cell Sheet1!A1
.
-
创建动态命名范围
MyList
将取决于您进行验证的单元格的值
Create a dynamic named range
MyList
that will depend on the value of the cell where you put the validation
= OFFSET(Sheet2!$ A $ 1,MATCH(Sheet1!$ A $ 1&*; Sheet2!$ A $ 1:$ A $ 300; 0)-1; 0; COUNTA(Sheet2!$ A:$ A))
=OFFSET(Sheet2!$A$1,MATCH(Sheet1!$A$1&"*";Sheet2!$A$1:$A$300;0)-1;0;COUNTA(Sheet2!$A:$A))
在单元格<$ c上添加验证列表$ c> Sheet1!A1 将引用到列表 = MyList
Add the validation list on cell Sheet1!A1
that will refert to the list =MyList
注意事项
-
这不是一个>真实自动完成,您必须首先输入,然后点击验证箭头:列表然后开始在列表的第一个匹配元素
This is not a real autocomplete as you have to type first and then click on the validation arrow : the list will then begin at the first matching element of your list
列表将一直到数据结束。如果您想要更精确(仅在列表中保持匹配元素),则可以使用 COUNTA
> SUMLPRODUCT 将计算匹配元素的数量
The list will go till the end of your data. If you want to be more precise (keep in the list only the matching elements), you can change the COUNTA
with a SUMLPRODUCT
that will calculate the number of matching elements
您的源列表必须按照
这篇关于Excel 2010:如何在验证列表中使用自动填充的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!