跳到主要内容

如何在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工作表中,如果您的范围包含一些重复的行,则可能需要选择它们或将其突出显示,但是如何快速解决此工作? Kutools for Excel,你可以使用 选择复制并 独特的细胞 实用程序可快速选择范围内的重复项或唯一值,或为重复项和唯一值填充背景和字体颜色。  点击免费试用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 Tab 为 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