如何创建一个excel下拉列表,显示具有数字隐藏值的文本 [英] How to Create an excel dropdown list that displays text with a numeric hidden value

查看:690
本文介绍了如何创建一个excel下拉列表,显示具有数字隐藏值的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个下拉列表,显示附有隐藏数值的文本。然后,我将在同一行上使用一个标准公式,根据所选的隐藏值计算一个值。

I am trying to create a drop down list that displays text with a hidden numerical value attached. Then I will have a standard formula on the same row that calculates a value based upon the hidden value selected.

推荐答案

数据验证下降down



数据验证中有一个列表选项。如果这与VLOOKUP公式结合使用,您将能够将所选值转换成一个数字。

Data validation drop down

There is a list option in Data validation. If this is combined with a VLOOKUP formula you would be able to convert the selected value into a number.

Excel 2010中的步骤是:

The steps in Excel 2010 are:


  • 使用匹配的值创建列表。

  • 数据标签中,选择数据验证

  • 将显示数据验证表单

  • 允许下拉列表设置为列表

  • 范围设置为第一部分的列表

  • 单击确定(如果需要,可以添加用户消息)

  • Create your list with matching values.
  • On the Data tab choose Data Validation
  • The Data validation form will be displayed
  • Set the Allow dropdown to List
  • Set the Source range to the first part of your list
  • Click on OK (User messages can be added if required)

一个单元格输入这样的公式

In a cell enter a formula like this

=VLOOKUP(A2,$D$3:$E$5,2,FALSE)

这将从列表的第二部分返回匹配的值。

which will return the matching value from the second part of your list.

或者,表单控件可以放在工作表上。它们可以链接到范围,并将所选值的位置编号返回到特定的单元格。

Alternatively, Form controls can be placed on a worksheet. They can be linked to a range and return the position number of the selected value to a specific cell.

Excel 2010中的步骤是:

The steps in Excel 2010 are:


  • 在工作表中创建数据列表

  • 点击开发人员选项卡和插入选项的下拉菜单

  • 在表单部分中,选择组合框或列表框

  • 使用鼠标在工作表上绘制框

  • 右键单击在框上选择格式控制

  • 将显示格式控制表单

  • 单击控制选项卡

  • <将输入范围设置为您的数据列表
  • 将单元格链接范围设置为要在其中显示
    所选项的编号的单元格

  • 单击确定

  • Create your list of data in a worksheet
  • Click on the Developer tab and dropdown on the Insert option
  • In the Form section choose Combo box or List box
  • Use the mouse to draw the box on the worksheet
  • Right click on the box and select Format control
  • The Format control form will be displayed
  • Click on the Control tab
  • Set the Input range to your list of data
  • Set the Cell link range to the cell where you want the number of the selected item to appear
  • Click on OK

这篇关于如何创建一个excel下拉列表,显示具有数字隐藏值的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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