Sort cells by certain word in cell

August 9, 2009 at 02:12:32
Specs: XP Home/Pro, 1gig
I have a spreadsheet with a row of cells that have two teams names in them," Avs vs. Hawks" , "Stars vs. Avs " , "Raiders vs. Avs " or "Hawks vs. Stars" (no quotations).
I want to sort all the Avs games into one colunm but half of the cells have the Avs name second, is there a way to Sort cells with a certain names in them no matter where the name is in the cell?

See More: Sort cells by certain word in cell

Report •

August 9, 2009 at 07:32:15
You can't do it with Excel's standard Sort feature.

You could do it with VBA or you could do it with a formula, but it would involve multiple steps.

First, do a Copy...Paste Special Transpose to get your row of data into a column.

Next, put this formula next to the first cell in the pasted column (I'll assume A2) and drag it down:


You'll should get "Avs" games and blanks.

Finally, copy those cells, do a PasteSpecial...Values and Sort Descending to move the blanks to the bottom.

If you are interested in using VBA, let me know.

Report •
Related Solutions

Ask Question