Sorting different strings of text

J

Jake

I'm trying to sort a column of text separtated by commas, where the same
strings may not always be in the same order within the cells. I'm trying to
run a pivot off these codes, but I'll probably double the size of the chart
if I can't sort.
ie
pr905,m806,pr903,
pr905,pr903,m806,
pr903,pr902,
pr902,pr903,
M807,PR903,
PR903,M807,

I'd appreciate any help--
Thanks in advance,
Jake
 
B

Barb Reinhardt

You could use TEXT TO COLUMNS to split out the strings
You may have to do a global search and replace for spaces
Sort the results (from left to right)
Concatenate them back together with =A1 & ", " & B1 ... etc
 
J

Jake

I'm able to separate all the text to columns, but I'm still having trouble
sorting left to right. It looks as though it's just swapping them, so if
originally it looks like this:
M807,PR903,
PR903,M807,
After sorting it looks like:
PR903,M807
M807,PR903
Depending on which row and ascending/descending order I use, I just can't
seem to arrange these into a corresponding usable fasion. They're the same,
but different if you know what I mean.
Sorry, I've never used the left/right sort option, so I'm probably doing
something wrong. I was able to concatenate back into 1 cell, so I got that
goin for me.

Jake
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top