How do I sort a list that contains blanks that I want to keep?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have copied a list from a pivot table, so there are blanks. Is there a way
for me to sort, and maintain those blanks. For example I have a list that
looks kind of like this:

John Smith Red
Orange
Yellow
John Doe Green
Mary Peters Red
Purple

It is important to know that John Smith goes along with Red, Orange and
Yellow. But I want to be able to sort the page so all of the people that
only like one color are grouped together and all of the people with multiple
colors are grouped together.
 
Get rid of the blanks.

Select column A then F5>Special>Blanks>OK

With blanks selected, type an = sign in the active cell.

Point with mouse to cell above then hit CTRL + ENTER to replicate formula
throughout all blanks.

You date will now look like...

John Smith Red
John Smith Orange
John Smith Yellow

etc.

You can copy column A and paste special>values to get rid of the formulas.


Gord Dibben Excel MVP
 
The problem is, I want to be able to group all of the people together that
like multiple colors. Is there a way to sort so my list can read
John Smith Red
John Smith Orange
John Smith Yellow
Mary Peters Red
Mary Peters Purple
John Doe Green
 
I would say, then, that you need to add another column to do a COUNTIF the
cells is equal to the name. (for instance, the name is in Column A, you
would put =countif(A:A,A1) to count how many times John Smith appears. Copy
it down. So, John's count will appear multiple times, but should still sort
properly by count.
************
Anne Troy
www.OfficeArticles.com
 
Back
Top