ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Sorting different strings of text (https://www.excelbanter.com/new-users-excel/201563-sorting-different-strings-text.html)

Jake

Sorting different strings of text
 
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

Barb Reinhardt

Sorting different strings of text
 
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
--
HTH,
Barb Reinhardt




"Jake" wrote:

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


Jake

Sorting different strings of text
 
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

--
Jake


"Barb Reinhardt" wrote:

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
--
HTH,
Barb Reinhardt




"Jake" wrote:

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



All times are GMT +1. The time now is 03:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com