提示:其他語言是Google翻譯的。 你可以訪問 English 版本。
登入
x
or
x
x
註冊
x

or

如何設置/顯示Excel中的下拉列表的預選值?

默認情況下,在您從列表中選擇一個值之前,您創建的常規下拉列表顯示為空白,但在某些情況下,您可能希望在用戶從下拉列表中選擇一個之前顯示或設置預選值/默認值列表如下圖所示。 這裡這篇文章可以幫助你。


您可能對此感興趣:

批量插入複選框/選項按鈕好idea2

你還會一個接一個地插入複選框或選項按鈕嗎? 同 Kutools for Excel's 批量插入複選框 - 批量插入選項按鈕 只需點擊一下,您就可以在一個範圍內插入複選框和選項按鈕。
doc插入按鈕
Office選項卡在Office中啟用選項卡式編輯和瀏覽,使您的工作更輕鬆......
Kutools for Excel解決了您的大多數問題,並使您的生產率提高了80%
  • 重用任何東西: 將最常用或最複雜的公式,圖表和其他任何內容添加到您的收藏夾中,並在將來快速重複使用它們。
  • 超過20文本功能: 從文本字符串中提取數字; 提取或刪除部分文字; 將數字和貨幣轉換為英文單詞。
  • 合併工具:將多個工作簿和工作表合二為一; 合併多個單元格/行/列,而不會丟失數據; 合併重複的行和總和。
  • 拆分工具:根據價值將數據分割成多個工作表; 一本工作簿可轉換為多個Excel,PDF或CSV文件; 一列到多列。
  • 粘貼跳過 隱藏/過濾行; 數和總和 按背景顏色; 將個性化電子郵件批量發送給多個收件人。
  • 超級過濾器: 創建高級過濾方案並應用於任何工作表; 分類 按週,日,頻率等; 過濾 通過大膽,公式,評論......
  • 超過300強大的功能; 與Office 2007-2019和365一起使用; 支持所有語言; 在您的企業或組織中輕鬆部署。

箭頭藍色右泡 使用公式為下拉列表設置默認值(預選值)


要為下拉列表設置默認值,您需要首先創建一個通用下拉列表,然後使用公式。

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。 支持所有語言。 在您的企業或組織中輕鬆部署。 全功能30天免費試用。
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 · 8 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 · 1 years 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 · 1 years 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 · 3 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.