提示:其它语言是由 Google 机器翻译的。 你可以访问 English 版本。
登录
x
or
x
x
马上登记
x

or

如何设置/显示Excel中的下拉列表的预选值?

默认情况下,在您从列表中选择一个值之前,您创建的常规下拉列表显示为空白,但在某些情况下,您可能希望在用户从下拉列表中选择一个之前显示或设置预选值/默认值列表如下图所示。 这里这篇文章可以帮助你。


您可能对此感兴趣:

批量插入复选框/选项按钮好idea2

你还会一个一个插入复选框或选项按钮吗? 同 Kutools for Excel's 批量插入复选框 批量插入选项按钮 只需点击一下,您就可以在一个范围内插入复选框和选项按钮。
doc插入按钮
Office选项卡在Office中启用选项卡式编辑和浏览,使您的工作更轻松......
Kutools for Excel - 最佳办公生产力工具将解决您的大部分Excel问题
  • 重用任何东西: 将最常用或最复杂的公式,图表和其他任何内容添加到您的收藏夹中,并在将来快速重复使用它们。
  • 超过20文本功能: 从文本字符串中提取数字; 提取或删除部分文本; 将数字和货币转换为英语单词...
  • 合并工具:多个工作簿和表格合二为一; 合并多个单元格/行/列而不丢失数据; 合并重复行和总和...
  • 拆分工具:根据价值将数据拆分为多个表格; 一个工作簿到多个Excel,PDF或CSV文件; 一列到多列......
  • 粘贴跳过 隐藏/过滤行; 数和总和 按背景颜色; 创建邮件列表和 通过Cell的价值发送电子邮件...
  • 超级过滤器: 创建高级过滤方案并应用于任何工作表; 排序 按周,日,频率等; 筛选 通过大胆,公式,评论......
  • 超过300强大的功能; 适用于Office 2007-2019和365; 支持所有语言; 在公司轻松部署; 全功能60天免费试用。

箭头蓝色右泡 使用公式为下拉列表设置默认值(预选值)


要为下拉列表设置默认值,您需要首先创建一个通用下拉列表,然后使用公式。

Kutools for Excel, 与超过 120 方便的Excel功能,提高工作效率,节省工作时间。

1。 创建一个下拉列表。 选择要放置下拉列表的单元格或范围,这里是K1,然后单击 数据 > 数据验证。 看截图:
doc显示预选值下拉列表2

2。 然后在 数据验证 对话框下 设置 标签,选择 名单 前往 列表,然后在下拉列表中选择要显示的值 来源 文本框。 看截图:
doc显示预选值下拉列表3

3。 然后点击 错误警报 选项​​卡中 数据验证 对话框,并取消选中 输入无效数据后显示错误提示 选项。 看截图:
doc显示预选值下拉列表4

4。 点击 OK 关闭对话框,然后转到下拉列表,然后键入此公式 = IF(J1 =“”,“--select--”) 进入它,然后按 输入 键。 看截图:
doc显示预选值下拉列表5

提示: 在公式, J1 是K1旁边的空白单元格,请确保单元格为空,并且“ - 选择 - “是您想要显示的预选值,您可以根据需要更改它们。

5。 然后保持选中的下拉列表单元格,然后单击 数据 > 数据验证 显示 数据验证 再次对话,然后转到 错误警报 标签,并检查 输入无效数据后显示错误提示 选项返回。 看截图:
doc显示预选值下拉列表6

7。 点击 OK,现在在用户从下拉列表中选择值之前,在指定的单元格中显示具有下拉列表的默认值。
doc显示预选值下拉列表7

请注意: 从下拉列表中选择一个值时,默认值将消失。
doc显示预选值下拉列表8



Kutools for Excel - 最佳办公生产力工具提高80%的生产力

  • 重用: 快速插入 复杂的公式,图表 以及你以前用过的任何东西; 加密单元格 密码; 创建邮件列表 并发送电子邮件...
  • 超级方程式酒吧 (轻松编辑多行文字和公式); 阅读布局 (轻松读取和编辑大量单元格); 粘贴到过滤范围...
  • 合并单元格/行/列 不丢失数据; 分裂细胞含量; 组合重复的行/列...防止重复的细胞; 比较范围...
  • 选择复制或唯一 行; 选择空行 (所有细胞都是空的); 超级查找和模糊查找 在许多工作簿中; 随机选择......
  • 精确复制 多个单元格而不更改公式参考; 自动创建参考 多张表; 插入项目符号,复选框等等......
  • 提取文本,添加文本,按位置删除, 删除空间; 创建和打印分页小计; 在单元格内容和注释之间转换...
  • 超级过滤器 (将过滤方案保存并应用到其他工作表); 高级排序 按月/周/日,频率等; 特殊过滤器 用粗体,斜体......
  • 结合工作簿和工作表; 根据键列合并表; 将数据拆分为多个表格; 批量转换xls,xlsx和PDF...
  • 超过300强大的功能。 支持Office / Excel 2007-2019和365。 支持所有语言。 在您的企业或组织中轻松部署。 全功能60天免费试用。
kte tab 201905

Office选项卡为Office提供选项卡式界面,使您的工作更轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,Publisher,Access,Visio和Project。
  • 在同一窗口的新选项卡中打开并创建多个文档,而不是在新窗口中。
  • 通过50%提高您的工作效率,每天为您减少数百次鼠标点击!
官方底部
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    miradek · 6 months ago
    hello, my data is about names and phone numbers. can make it if two names selected in one cells using data validations, the particular name which their name as selected, their phone numbers will be shown next to it.

    help me!
  • To post as a guest, your comment is unpublished.
    Justin · 10 months ago
    Hello!

    How can I set a data validation list such that if the drop down value in the cell is deleted, the cell will automatically show a default value (i.e. "-Select-")?

    For example, I have a worksheet with multiple drop down lists that I want to show a default value of "-Select-" once the sheet is opened. A user will select values from the lists that will impact the result of calculations throughout the entire spreadsheet. A user may accidentally "delete" the cell contents of the lists. If this happens, rather than the cell becoming blank, I want the cell to show a default value of "-Select-". This scenario occurs in multiple random locations throughout the spreadsheet, not just in one localized place.

    I was able to find the following VBA code so far, but it only applies the concept over a range, rather than just individual cells that contain drop down lists. The problem with what I have coded so far is that every single blank cell in the range ends up with "-Select-" in it. Some of the lists are in ranges, but some are also scattered throughout the sheet. The problem I'm having with my current code is that every single blank cell in the range ends up with "-Select-" in it. I'm trying to get this to apply over the entire worksheet to ONLY cells that are drop down lists.

    Is what I'm trying to accomplish even possible?

    Example file can be found here:
    https://drive.google.com/file/d/1VoO8VgFs3IJ0ALwqfk0i8gt69UE4vEKW/view?usp=sharing

    Example code:

    Option Explicit

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim cel As Range
    ' If Target.Cells.Count > 1 Then Exit Sub 'turning this off allows multiple cells to be selected and deleted at the same time
    If Not Intersect(Target, Range("f2:p17")) Is Nothing Then
    For Each cel In Range("f2:p17")
    Application.EnableEvents = False
    If IsEmpty(cel.Value) Then cel.Value = "-Select-"
    Next cel
    End If
    Application.EnableEvents = True
    End Sub


    Thanks in advance!
  • To post as a guest, your comment is unpublished.
    Justin · 10 months ago
    How can I set a data validation list such that if the drop down value in the cell is deleted, the cell will automatically show the a default value (i.e. "-Select-")?

    For example, I have a worksheet with multiple drop down lists that I want to show a default value of "-Select-" once the sheet is opened. A user will select values from the lists that will impact the result of calculations throughout the entire spreadsheet. A user may accidentally "delete" the cell contents. If this happens, rather than the cell becoming blank, I want the cell to show a default value of "-Select-". This scenario occurs in multiple random locations throughout the spreadsheet, not just in one localized place.

    I was able to come up with the following VBA code so far, but I've only figured out how to apply the concept over a range, rather than just cells that contain a drop down list. The problem with what I have coded so far is that every single blank cell in the range ends up with "-Select-" in it.

    Option Explicit

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim cel As Range
    ' If Target.Cells.Count > 1 Then Exit Sub
    If Not Intersect(Target, Range("f2:p17")) Is Nothing Then
    For Each cel In Range("f2:p17")
    Application.EnableEvents = False
    If IsEmpty(cel.Value) Then cel.Value = "-Select-"
    Next cel
    End If
    Application.EnableEvents = True
    End Sub
  • To post as a guest, your comment is unpublished.
    Dary · 2 years ago
    The idea is nice, but my problem is that if the dropdown value is deleted, it doesn't revert to the default.
    • To post as a guest, your comment is unpublished.
      zaid · 2 years ago
      I also have the same issue , please reply if you solved it
    • To post as a guest, your comment is unpublished.
      Scott · 2 years ago
      Exactly!!! I'm having the same issue, have you found a solution?
      • To post as a guest, your comment is unpublished.
        Alex · 1 years ago
        You can insert the function in that specific cell using VBA, make sure you call the insert function when workbook is opening.