Note: The other languages of the website are Google-translated. Back to English

How to filter all related data from merged cells in Excel?

doc filter merged cell 1

Supposing there is a column of merged cells in your data range, and now, you need to filter this column with merged cells to show all the rows which are related with each merged cell as following screenshots shown. In excel, the Filter feature allows you to filter only the first item which associated with the merged cells, in this article, I will talk about how to filter all related data from merged cells in Excel?

Filter all related data from merged cells in Excel

Filter all related data from merged cells in Excel with Kutools for Excel


Filter all related data from merged cells in Excel

To solve this job, you need to do following operations step by step.

1. Copy your merged cells data to other blank column in order to keep the original merged cell formatting.

doc filter merged cell 2

2. Select your original merged cell (A2:A15), and then click Home > Merged & Center to cancel the merged cells, see screenshots:

doc filter merged cell 3

3. Keep the selection status of A2: A15, and then go to Home tab, and click Find & Select > Go To Special, in the Go To Special dialog box, select Blanks option under Select section,see screenshot:

doc filter merged cell 4

4. All the blank cells have been selected, then type = and press Up arrow key on keyboard, and then press Ctrl + Enter keys to fill all the selected blank cells with the value above, see screenshot:

doc filter merged cell 5

5. Then you need to apply the formatting of your pasted merged cells in step 1, select the merged cells E2:E15, and click Home > Format Painter, see screenshot:

doc filter merged cell 6

6. And then drag the Format Painter to fill from A2 to A15 to apply the original merged formatting to this range.

doc filter merged cell 7

7. At last, you can apply the Filter function to filter the item that you want, please click Data > Filter, and choose your needed filter criteria, click OK to filter the merged cells with all their related data, see screenshot:

doc filter merged cell 8


Filter all related data from merged cells in Excel with Kutools for Excel

The above mehtod may be somewhat difficult for you, here, with Kutools for Excel's Filter Merge Cells feature, you can quickly filter all relative cells of the specific merged cell. Click to download Kutools for Excel! Please see the following demo:

After installing Kutools for Excel, please do as this:

1. Select the column that you want to filter the specific merged cell, and then click Kutools Plus > Special Filter > Special Filter, see screenshot:

doc filter merged cell 8

2. In the Special Filter dialog box, select Format option, then choose Merge Cells from the drop down list, and then enter the text value you want to filter, or click  doc filter merged cell 2 button to select the cell value you need, see screenshot:

doc filter merged cell 8

3. Then click Ok button, and a prompt box is popped out to remind you how many cells matched the criteria, see screenshot:

doc filter merged cell 8

4. And then click OK button, all relative cells of the  specific merged cell have been filtered out as following screenshot shown:

doc filter merged cell 8

Click to Download Kutools for Excel and free trial Now!


Demo: Filter all related data from merged cells in Excel

Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days. Download and free trial Now!

The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Comments (63)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
wow, you're a genius, i searched 10 othersites with no answer.
This comment was minimized by the moderator on the site
Excellent, nicely laid out explanation. Unfortunately my spreadsheet was 2318 rows long, with many merged cells in many columns; but Ha-Ho. Thanks
This comment was minimized by the moderator on the site
Perfect explanation. Thank you!!!
This comment was minimized by the moderator on the site
Works a treat, thanks.
This comment was minimized by the moderator on the site
Great job! Many thanks
This comment was minimized by the moderator on the site
Brilliant! Thanks! I thought I'd never get this sorted.
This comment was minimized by the moderator on the site
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 :)
This comment was minimized by the moderator on the site
[quote]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 :)By Peter[/quote] I have the same problem. If any one has an answer please let me know.
This comment was minimized by the moderator on the site
Brilliant solution. Thanks!
This comment was minimized by the moderator on the site
Thanks for your help, It really works
This comment was minimized by the moderator on the site
Brilliant! Such a good clear explanation - saved hours of work-arounds - thank you!
This comment was minimized by the moderator on the site
good soultion. thanks....
This comment was minimized by the moderator on the site
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.
This comment was minimized by the moderator on the site
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
This comment was minimized by the moderator on the site
Thanks for the help... Great info... :-)
This comment was minimized by the moderator on the site
This is genius. Thank you so much for sharing.
This comment was minimized by the moderator on the site
Excellennt...thank you so much
This comment was minimized by the moderator on the site
Excellent, Thanks Man
This comment was minimized by the moderator on the site
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.
This comment was minimized by the moderator on the site
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.
This comment was minimized by the moderator on the site
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.
This comment was minimized by the moderator on the site
I'm pretty sure this is completely unintended. All the available documentation suggests that when cells are merged, all the individual cell addresses in the merged region are supposed to be empty except for the top left one. Strictly speaking, the behavior demonstrated on this page is a bug, because it creates merged regions that violate the specification. It's a very useful bug that should be a feature, but as things stand right now, it's still technically a bug. This seemingly nit-picky distinction is important because if something is not in the spec, it may change with new releases, so it isn't really a good idea to depend on things like this with your use case.
This comment was minimized by the moderator on the site
Hello friend,

Thank you for your answer. I have to say that Format Painter is really an awesome feature. In fact, I have a simplified version of the solution 1. You still need to download Kutools for Excel.

1. Copy your merged cells data to other blank column in order to keep the original merged cell formatting.

2. Go to Kutools > Ranges &Cells > Merge & Split > Unmerge Cells & Fill Value. All the merged cells are unmerged and each cell is filled with value of the merged cells.

3. Apply the formatting of your pasted merged cells in step 1, click Home > Format Painter, and apply the format to the original cell range.

4. Click Home > Sort & Filter > Filter. The merged cells are sucessfully filtered. Please see the screenshots.

Hope it helps. Have a nice day.

Sincerely,
Mandy
There are no comments posted here yet
Load More
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations