简体   繁体   English

Excel 下拉列表

[英]Excel Drop Down List

I'm making a chart that contains drop downs per each day and i have it setup where the first row has two options: √ or X. and the second row holds numbers as an option.我正在制作一个图表,其中包含每天的下拉菜单,我将其设置为第一行有两个选项:√ 或 X。第二行包含数字作为选项。 I want to be able to switch from √, X, to 12,11,10... without having to constantly separate things.我希望能够从 √、X 切换到 12、11、10...,而不必不断地分开事物。 When I pull that cell it just returns all of those number on 1 line and doesn't separate them.当我拉出该单元格时,它只会在 1 行上返回所有这些数字,并且不会将它们分开。

1 How can I have my drop down pull from one cell in the source field? 1如何从源字段中的一个单元格中下拉下拉菜单? Naturally it wants a 1 cell or multiple for a series of words or numbers.自然,它需要一个单元格或多个单元格来表示一系列单词或数字。 I have a formula that returns a series of numbers in once cell: enter image description here我有一个公式可以在一个单元格中返回一系列数字:在此处输入图像描述

在此处输入图像描述

[1] [1] 在此处输入图像描述 : https://i.stack.imgur.com/b1L2z.png : https://i.stack.imgur.com/b1L2z.png

I think the infrastructure you built isn't suitable for your objective.我认为您构建的基础架构不适合您的目标。 Therefore my "solution" might not suit your problem.因此,我的“解决方案”可能不适合您的问题。 But it's nice.但这很好。 Please take a look.请看一下。

I use the range F6:W17 as a source for the drop-down lists.我使用范围 F6:W17 作为下拉列表的来源。 And I need a cell somewhere that specifies which list is to be selected.我需要一个单元格来指定要选择的列表。 I named the list source DList and numbered the rows from 1 and up, each numbered row containing the list of one drop-down.我将列表源命名为DList并对从 1 及以上的行进行编号,每个编号的行包含一个下拉列表。 I chose A1 as the cell to specify the list.我选择 A1 作为单元格来指定列表。 A 7 entered in A1 specified the drop-down list in row 7 of the DList range. A1 中输入的 7 指定了DList范围第 7 行中的下拉列表。 The location of DList is immaterial. DList的位置无关紧要。

Here is the formula that specifies the drop-down list in the data validation.这是在数据验证中指定下拉列表的公式。

=OFFSET(INDEX(DList,1,1),$A$1-1,0,1,COUNTA(INDEX(DList,$A$1,0)))

INDEX(DList,1,1) specifies the first cell of the named range. INDEX(DList,1,1)指定命名范围的第一个单元格。 It's the cell from where the OFFSET function counts everything.这是偏移量 function 计算所有内容的单元格。

$A$1-1,0 specifies the offset from the first specified cell (which is the first cell in the source range). $A$1-1,0指定从第一个指定单元格(源区域中的第一个单元格)开始的偏移量。 $A$.-1 specifies the row. $A$.-1 指定行。 The first row of DList has the #1 in A1 but the offset from the first row of DList to row #1 is zero. DList的第一行在 A1 中具有 #1,但从DList的第一行到行 #1 的偏移量为零。 Hence $A$1-1.因此$A$1-1。

1,COUNTA(INDEX(DList,$A$1,0) specifies the number of rows and columns of the range being specified. There is always only 1 row, the one specified by the offset, and the number of columns is equal to the number of entries in that row. This ensures that there will be no blank entries in your drop-down so long as all blanks are at the end of the row. 1,COUNTA(INDEX(DList,$A$1,0)指定指定范围的行数和列数。总是只有1行,由偏移量指定,列数等于该行中的条目数。这样可以确保下拉列表中没有空白条目,只要所有空白都在行的末尾。

I couldn't make out how you intend to specify the drop-down but I imagine that the functionality of A1 can either be taken over by another cell you specify (I would prefer to name the cell rather than use the address), or you might enter a formula in A1 (or whatever cell takes its place) that picks the correct number needed by the validation formula.我无法弄清楚您打算如何指定下拉列表,但我想 A1 的功能可以被您指定的另一个单元格接管(我更愿意命名单元格而不是使用地址),或者您可能会在 A1(或任何代替它的单元格)中输入一个公式,该公式会选择验证公式所需的正确数字。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM