跳到主要內容

如何在Excel中創建沒有空白的動態列表?

在某些情況下,您有一個包含一些空白的數據列表,現在您想基於這些數據創建一個動態列表,而沒有空白,並且大多數人可能會逐個刪除空白然後創建動態列表,但是這裡我將告訴您一種在Excel中解決此任務的快速方法。

創建動態列表並刪除空格


箭頭藍色右氣泡 創建動態列表並刪除空格

1.選擇原始列表旁邊的單元格,然後鍵入此公式 = IF(B2 =“”,“”,MAX(A $ 1:A1)+1) 放入其中,然後將自動填充手柄向下拖動到所需範圍。 現在,您將僅看到帶有數據的單元格旁邊有一個數字。 看截圖:

doc-drop-down-list-with-blank-1

在上面的公式中,B2是您要根據其創建動態列表的區域中的第一個單元格。

2.然後轉到另一列並鍵入此公式 =IFERROR(INDEX($B$2:$B$11,MATCH(ROW()-ROW($D$1),$A$2:$A$11,0)),"") 入它,然後向下拖動自動填充手柄,直到出現空白單元格。

doc-drop-down-list-with-blank-2

在上式中,B2:B11是原始數據的範圍,而A2:A11是對步驟1中的行進行編號的範圍。

3.然後選擇要創建不帶空格的動態列表的單元格或範圍,然後單擊 數據 > 數據驗證。 看截圖:

doc-drop-down-list-with-blank-3

4。 在裡面 數據驗證 對話框中選擇 名單 來自 列出並鍵入此公式 = OFFSET(Sheet1!$ C $ 1,1,0,MAX(Sheet1!$ A:$ A),1) 加到 資源 文本框。 看截圖:

doc-drop-down-list-with-blank-4

備註:

1.在Excel 2007中,用戶不能使用對其他工作表或工作簿的引用 數據驗證 標準。 因此,您需要在第3步的當前工作表中選擇一個空白單元格,然後輸入公式 =偏移($ C $ 1,1,0,MAX($ A:$ A),1) 加到 資源 步驟4中的文本框。

2.在上面的公式中,C1是您在步驟2中創建的新列表的第一個單元格。

5。 點擊 OK。 然後,您可以看到動態列表創建時沒有空格。

doc-drop-down-list-with-blank-5


在Excel範圍內快速選擇重複或唯一值

在Excel工作表中,如果您的範圍包含一些重複的行,則可能需要選擇它們或將其突出顯示,但是如何快速解決此工作? Excel的Kutools,你可以使用 選擇複製並 獨特的細胞 實用程序以快速選擇範圍內的重複項或唯一值,或為重複項和唯一值填充背景和字體顏色。  點擊免費試用30天!
doc在第6列中突出顯示重複項
 
Kutools for Excel:擁有300多個便捷的Excel加載項,可以在30天內免費試用。

相關文章:

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為Office帶來了選項卡式界面,使您的工作更加輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,發布者,Access,Visio和Project。
  • 在同一窗口的新選項卡中而不是在新窗口中打開並創建多個文檔。
  • 將您的工作效率提高 50%,每天為您減少數百次鼠標點擊!
Comments (16)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
The version of Excel my workplace uses does not allow the filter function and I have been unsuccessfully searching for a workaround. FINALLY this was the one! I am crying tears of joy. Thank you.
This comment was minimized by the moderator on the site
Thanks so so much … working well for me, with some adjustments … love it ……😀👍🌟
This comment was minimized by the moderator on the site
Excellent! This works to eliminate cells with "" in them also and allows you to use many functions that cannot handle blank or empty cells. Thank you!
This comment was minimized by the moderator on the site
THank you so much for this beautiful trick !! very smart and beautiful ! Marc
This comment was minimized by the moderator on the site
you are a genius :)
This comment was minimized by the moderator on the site
Thanks a lot! Just perfect and exactly what I needed.
This comment was minimized by the moderator on the site
Hi Guys, your tutorial above 'create a dynamic list without blank in Excel' worked perfectly for me.

Without people like you I would never have gained the skills in Excel I have today.

Thank You so very much. Regards. JV
This comment was minimized by the moderator on the site
This works perfectly, thanks, but what can I do in case of dependant lists, where the secondary list depends on a primary list in another cell?
This comment was minimized by the moderator on the site
I recreated the exact same formulas and cells and it repeats the numbers. Instead of 1, 2, 3, it's showing, 1, 1, 2, 2, 3, 3, etc.
This comment was minimized by the moderator on the site
Hi, sdafasf, could you upload your data and formula for details?
This comment was minimized by the moderator on the site
I'm just getting circular reference on the max formula? It's not working. If I change my iteration settings, it just keeps continuously keeps adding for no reason.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations