Excel: Filter on column merged downwards
Solution 1:
In Excel, merging multiple cells into one cell will keep the upper-left most data only. For example, if you merge the range A2:A6, only A2 will keep its value and A3:A6 will be blank. So, merged cells will be troublesome in your case. Instead, you can unmerge the cells in your first column, fill them with the related values (document names), and then use Filtering. Moreover, you can also use Pivot Tables (Insert > Pivot Table). Drag your first column's header (Document name) to Row Labels (in the Pivot Table Field List), and other column headers to Column Labels. You can change the design of your Pivot Table in whatever way you like.