Home » excel » sorting – How to sort/filter merged cells in Excel?

sorting – How to sort/filter merged cells in Excel?

Posted by: admin May 14, 2020 Leave a comment

Questions:

I have two columns – column A, and column B. Shown below.

  A  |  B
 ---------
  a  |  1
  a  |  2
  b  |  3
  b  |  1
  b  |  4
  c  |  2
  c  |  3
  c  |  4

As you can see, column A has many redundant data, so I merged them together. Shown below. (I need to get rid of redundant data and represent them properly. That’s the main task.)

  A  |  B
 ---------
  a  |  1
     |  2
 ---------
     |  3
  b  |  1
     |  4
 ---------
     |  2
  c  |  3
     |  4
 ---------

Now the problem is I cannot apply sort/filter function to both column. Error message was displayed when I want to sort the row. Filter does not work properly also, for example when I checked a, I should see 1 and 2 in column B, however only 1 is shown in column B.

So my question is: how can I get the sort/filter work with merged cells?

How to&Answers:

Fill your cells a,b,c with a color and sort on that specific color. Then for example the 1 and 2 will display when sorted on a colored cell “a”

Answer:

general solution, which works for when there are many more criteria.

Put in a helper column C

=if(A2="",C1,A2)

then filter based on that, it will propogate the merged data down.