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

or

如何在Excel中过滤来自合并单元格的所有相关数据?

doc过滤器合并单元格1

假设数据区域中有一列合并的单元格,现在需要使用合并单元格过滤此列,以显示与每个合并单元格相关的所有行,如下面的截图所示。 在Excel中,“过滤器”功能允许您仅过滤与合并单元格关联的第一项,在本文中,我将讨论如何从Excel中的合并单元格过滤所有相关数据?

在Excel中过滤来自合并单元格的所有相关数据

使用Kutools for Excel从Excel中的合并单元格过滤所有相关数据


快速轻松地过滤特定合并单元格中的所有相关数据

Kutools for Excel过滤合并单元格 实用程序可以帮助您尽快过滤指定合并单元格的所有相对单元格值。 点击下载Kutools for Excel!


在Excel中过滤来自合并单元格的所有相关数据


为了解决这个问题,你需要一步步做下面的操作。

1。 将您的合并单元格数据复制到其他空白列,以保持原始合并的单元格格式。

doc过滤器合并单元格2

2。 选择您的原始合并单元格(A2:A15),然后单击 主页 > 合并与中心 取消合并的单元格,请参阅截图:

doc过滤器合并单元格3

3。 保持A2:A15的选择状态,然后转到主页选项卡,然后单击 查找和选择 > 去特别 去特别 对话框中选择 空白 选项下 选择 部分,看截图:

doc过滤器合并单元格4

4。 所有的空白单元格已被选中,然后键入 = 并按下 Up 键盘上的箭头键,然后按 Ctrl + Enter 键填写所有选定的空白单元格上面的值,看截图:

doc过滤器合并单元格5

提示:如果您有Kutools for Excel及其Unmerge Cell实用程序,则可以取消合并的单元格并单击一次即可复制重复值.
DOC-过滤合并的细胞-14

5。 然后,您需要在步骤1中应用粘贴的合并单元格的格式,选择合并的单元格E2:E15,然后单击 主页 > 格式画家,看截图:

doc过滤器合并单元格6

6。 然后拖动 格式画家 从A2填充到A15将原始合并的格式应用于此范围。

doc过滤器合并单元格7

7。 最后,你可以申请 筛选 功能来过滤你想要的项目,请点击 数据 > 筛选,并选择您所需的过滤条件,点击 OK 使用所有相关数据过滤合并的单元格,请参阅截图:

doc过滤器合并单元格8


使用Kutools for Excel从Excel中的合并单元格过滤所有相关数据

以上这个方法对你来说可能有些困难,在这里 Kutools for Excel's 过滤合并单元格 功能,您可以快速筛选特定合并单元格的所有相关单元格。

Kutools for Excel : 与超过300方便的Excel加载项,在60天免费试用没有限制.

安装后 Kutools for Excel,请这样做:

1。 选择要过滤特定合并单元格的列,然后单击 Kutools Plus > 特殊过滤器 > 特殊过滤器,看截图:

doc过滤器合并单元格8

2。 在 特殊过滤器 对话框中选择 格式 选项,然后选择 合并单元格 从下拉列表中选择,然后输入要过滤的文本值,或单击 doc过滤器合并单元格2 按钮选择您需要的单元格值,请参阅截图:

doc过滤器合并单元格8

3。 然后点击 Ok 按钮,弹出一个提示框,提醒您符合条件的单元格数量,请参见屏幕截图:

doc过滤器合并单元格8

4。 然后点击 OK 按钮,特定合并单元格的所有相关单元格已被过滤掉,如下面的屏幕截图所示:

doc过滤器合并单元格8

点击下载Kutools for Excel和免费试用版吧!


演示:在Excel中过滤来自合并单元格的所有相关数据

Kutools for Excel:比200方便的Excel加载项,可以在60天免费试用。 下载并免费试用现在!


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.
    Jean · 6 days ago
    Muchas gracias, excelente aporte
  • To post as a guest, your comment is unpublished.
    Heisenbeerg · 3 months ago
    Nice solution
  • To post as a guest, your comment is unpublished.
    Kans · 8 months ago
    In the above example, if I filter as ORDER < 300 (column B), the border after each PRODUCT (column A) is lost.. How can it be achieved..?
  • To post as a guest, your comment is unpublished.
    Vish · 10 months ago
    Thanks a ton! This was exactly the issue that i had and was able to solve because of your explanation.
  • To post as a guest, your comment is unpublished.
    Tobi · 1 years ago
    What if your data has empty merged cells? Something like:

    |Column A | Column B|
    | Data 1 | bla |
    | | blubb |
    ------------------------------
    | Data 3 | bla bla |
    | | blubb blubb |
    ------------------------------
    | Data 5 | |
    | | |
    ------------------------------
    | Data 7 | bla blubb |


    How can you solve this?
  • To post as a guest, your comment is unpublished.
    krunal · 1 years ago
    thank you so much
  • To post as a guest, your comment is unpublished.
    Bingo · 1 years ago
    you're a hero
  • To post as a guest, your comment is unpublished.
    riyaz · 1 years ago
    Thank you so Much
  • To post as a guest, your comment is unpublished.
    geemoney · 1 years ago
    Thank you for tutorial. I am using this for a dashboard template, however when you add a new row you loose the ability to filter correctly? Is there a workaround for this? Something simple that someone with little excel knowledge can do?


    thanks
  • To post as a guest, your comment is unpublished.
    Kishore · 2 years ago
    Great.......
  • To post as a guest, your comment is unpublished.
    sri · 2 years ago
    Great Help. Thank u so much... :)
  • To post as a guest, your comment is unpublished.
    Marco Talin · 2 years ago
    For those wondering why this works, it's because the merge button in excel executes the "Merge" command, which inherently involves deleting data in other cells. Using Format Painter just applies the merged format.

    To put it in simple terms, think of it as the merge button on the Excel Ribbon doing two things:
    1) Merge cells
    2) Delete excess data

    By using the Format Painter, you're just doing step one of that process without doing step two. You achieve the same results if you "Paste Special-Formats Only". Also, since the "sub cells" refer back to the first cell for their value, they will all get changed when you change the value of the cell, since changing the value of a merged group of cells only changes the top-left cell in the group.

    I still have yet to find a quick way of doing this without VBA shenanigans. I really wish Microsoft included a merge option that didn't erase the other values. They give you the warning up front that they'll delete your data. You think it wouldn't be too much trouble to add an option to change that (at least, as of v2013).
  • To post as a guest, your comment is unpublished.
    Nicola · 2 years ago
    HELP!!

    I have made a spread sheet, row A contains merged cells then the next 3 rows contain the week day, the date and 2 columns with other data so there are 14 columns below the merged cells in the first row. I am trying to add a filter to the top row so that all information that will be entered into the 7 columns below will be included in the drop down filter menu as just now it just includes the information in the first column.

    I would appreciate any help with this!!

    Thank you!!
  • To post as a guest, your comment is unpublished.
    ying · 2 years ago
    this help me a lot!thanks
  • To post as a guest, your comment is unpublished.
    HOOOOOOMAN · 2 years ago
    That 's great
    You solved all my problem.
  • To post as a guest, your comment is unpublished.
    Bill Gates · 2 years ago
    This is an elegant solution. Many thanks.
  • To post as a guest, your comment is unpublished.
    Virginie · 2 years ago
    Hi,

    Is it possible to paste this conditional format to new entries?
    I've applied your method in my file, but each time I create other raws with merged cells, the format does not get pasted...
  • To post as a guest, your comment is unpublished.
    Matvey · 2 years ago
    2 simple words:

    THANK YOU!
  • To post as a guest, your comment is unpublished.
    Bharghav · 3 years ago
    Nice Tip.

    Thanks a Ton....!
  • To post as a guest, your comment is unpublished.
    jafir khan Niazi · 3 years ago
    I've have merged rows in my data at the top and at the bottom . I want to sort my data from largest to smallest without unmerging my top and bottom rows because these merged rows have no data instead they are just headings and at the bottom they are total rows
  • To post as a guest, your comment is unpublished.
    Anita Rajan · 3 years ago
    This was very helpful. The detailed diagrammatic exampled assisted a lot. Good job
  • To post as a guest, your comment is unpublished.
    Paul · 3 years ago
    Very good and useful explanation. Thank you for the effort.
  • To post as a guest, your comment is unpublished.
    Srinu · 3 years ago
    very helpful to me thanks for saving my time, it really very helpful to learn easily once again thanks.
  • To post as a guest, your comment is unpublished.
    michael · 3 years ago
    It works, but for some reason in big files, when I use the filter, the whole file freezes up. does anyone know why?
  • To post as a guest, your comment is unpublished.
    Raghu · 3 years ago
    Awesome explanation.
    Work perfectly. Thank you so much
  • To post as a guest, your comment is unpublished.
    raveendran · 3 years ago
    first its good example.
    But if we add new value again we have to do same work
    • To post as a guest, your comment is unpublished.
      Jorge Sabori · 3 years ago
      [quote name="raveendran"]first its good example.
      But if we add new value again we have to do same work[/quote]
      Do you have any better solution?
  • To post as a guest, your comment is unpublished.
    Jorge Sabori · 3 years ago
    Awesome! Thanks a bunch! Even when i had to read other posts simultaneously since i'm on Mac, still this was the key to everything. If i had a million dollars i'd share half with you :P !
  • To post as a guest, your comment is unpublished.
    ANYAHAN23 · 3 years ago
    Amazinggg .. been looking for this tutorial! :)

    KUDOS!
  • To post as a guest, your comment is unpublished.
    Tengku · 4 years ago
    Work perfectly. Thank you so much
  • To post as a guest, your comment is unpublished.
    Saravanan Elumalai · 4 years ago
    How to filter all related data from merged cells in Excel? Firstly Thanks!!! this worked perfectly. the steps are very clear and resolved my problem. But do we have any macros for this because the sheet i'm working is continuously updated by my team so i need to do this procedure every day or whenever who pulls this report, So i need macro for this. can anyone help. Thank you very much.
  • To post as a guest, your comment is unpublished.
    Abdul · 4 years ago
    Wah...Excellent Solution Thanks :)
  • To post as a guest, your comment is unpublished.
    IT · 4 years ago
    thanks for this tutorial:)
  • To post as a guest, your comment is unpublished.
    Paul H · 4 years ago
    First of all, many thanks for this. This is the perfect solution to an irritating problem, and the only real answer to this question I have seen anywhere.

    I am curious, though, about if there is any other way to achieve the same final result without using the format painter. It seems very odd to me (almost like an unintended error on Microsoft's part) that the format painter would lead to a different final result than can be achieved through ribbon buttons/menus/etc. I always thought the format painter was a convenient shortcut, but I had never previously seen it lead a to a result that can't be achieved any other way.

    I experimented with this quite a bit, and I noticed that when the above procedure is used, the individual cells retain their values after the merge is applied via the format painter. Actually, this is true even if the cell values were different (which can be dangerous because it could lead one to believe they are referencing the visible value in the merged cell, when in fact the underlying value can be different).

    Without the format painter, merging cells causes all but the top left cell values to be replaced with 0.

    I'm glad this little anomaly exists because it will greatly improve the functionality of my spreadsheet, but I would still appreciate it if anyone has more explanation.
  • To post as a guest, your comment is unpublished.
    Andy · 4 years ago
    Doesn't work, when I filter again it only displays one row.
    At least when dealing with multiple columns, with different merge-levels.. And yes I made sure that when unmerging the text still remains in all cells. Frustrating.. had hopes with my precious excel but seems I'll have to rethink the whole thing.
  • To post as a guest, your comment is unpublished.
    ElDiablo · 4 years ago
    First of all, thanks for this awesome solution. It certainly does the trick. But I'm wondering if anyone can explain why the format painter causes the merged cells to keep their underlying value while the regular merge function does not. There seems to be no way to achieve this result without using the format painter, which is odd (I always thought the format painter was only for convenience - anything it does can also be achieved via other means).

    I tried a little experiment as follows:
    -Cells A1 through A4 merged using the "Merge & Center" button. Entered "ABC" as the value.
    -Cells B1 and B2 had "ABC" as the value, but B3 and B4 had "DEF" as the value. Then I applied the format painter from A1:A4 to B1:B4.
    - Entered formulas elsewhere in the sheet that referenced each of the individual cells. Here are the results:
    =A1 displays "ABC"
    =A2 displays 0
    =A3 displays 0
    =A4 displays 0
    =B1 displays "ABC"
    =B2 displays "ABC"
    =B3 displays "DEF"
    =B4 displays "DEF"

    So even though B1:B4 appear merged and only display the value in B1 ("ABC"), Excel is keeping the original individual values for each cell in memory (even if they don't match!). And the only way to achieve seems to be with the format painter. Very odd.

    I would be very grateful if anyone has more thoughts on this.
  • To post as a guest, your comment is unpublished.
    Me · 4 years ago
    Excellent, Thanks Man
  • To post as a guest, your comment is unpublished.
    jaz · 4 years ago
    Excellennt...thank you so much
  • To post as a guest, your comment is unpublished.
    cristina · 4 years ago
    This is genius. Thank you so much for sharing.
  • To post as a guest, your comment is unpublished.
    Kavi · 4 years ago
    Thanks for the help... Great info... :-)
  • To post as a guest, your comment is unpublished.
    Bryan R · 4 years ago
    That's an excellent solution thank you!

    Is there anyway to ensure the information from the merged cell is copied when filtered? I seem to just get a blank cell copied

    any help would be greatly appreciated
  • To post as a guest, your comment is unpublished.
    Jackie · 4 years ago
    This was a HUGE help to me on a big project. This is a great skill I will utilize in the future. Thank you for explaining it so well.
  • To post as a guest, your comment is unpublished.
    Vijay · 4 years ago
    good soultion. thanks....
  • To post as a guest, your comment is unpublished.
    Stevec · 4 years ago
    Brilliant! Such a good clear explanation - saved hours of work-arounds - thank you!
  • To post as a guest, your comment is unpublished.
    Anant · 4 years ago
    Thanks for your help, It really works
  • To post as a guest, your comment is unpublished.
    Rob Smith · 4 years ago
    Brilliant solution. Thanks!
  • To post as a guest, your comment is unpublished.
    Peter · 4 years ago
    Unfortunately every time you will add new row you need to un-merge (un-format), fill out the value for blank cell and them format again. Mankind should move to some more sophisticated tools than excel for reasons like this :)
    • To post as a guest, your comment is unpublished.
      Bala · 2 years ago
      [quote name="Peter"]Unfortunately every time you will add new row you need to un-merge (un-format), fill out the value for blank cell and them format again. Mankind should move to some more sophisticated tools than excel for reasons like this :)[/quote]

      I have the same problem. If any one has an answer please let me know.
  • To post as a guest, your comment is unpublished.
    Belinda · 5 years ago
    Brilliant! Thanks! I thought I'd never get this sorted.
  • To post as a guest, your comment is unpublished.
    Tarek · 5 years ago
    Great job!
    Many thanks
  • To post as a guest, your comment is unpublished.
    AP · 5 years ago
    Works a treat, thanks.
  • To post as a guest, your comment is unpublished.
    ##### · 5 years ago
    Perfect explanation. Thank you!!!