ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   sorting a concatenated cell (https://www.excelbanter.com/excel-discussion-misc-queries/106115-sorting-concatenated-cell.html)

wmack

sorting a concatenated cell
 

I have a cell that is entered FIRSTNAME, LAST NAME. What I have done is
using TRIM LEFT MID and Finally Concatenate, switched the First name
with the last name in a different column. Now all I want to be able to
do is to sort the cells alphabetically. I am sure that I need to use
another approach to this.


--
wmack
------------------------------------------------------------------------
wmack's Profile: http://www.excelforum.com/member.php...o&userid=37801
View this thread: http://www.excelforum.com/showthread...hreadid=573649


raypayette

sorting a concatenated cell
 

It seems to me that you should have sorted the data before concatenating
them!


--
raypayette


------------------------------------------------------------------------
raypayette's Profile: http://www.excelforum.com/member.php...o&userid=29569
View this thread: http://www.excelforum.com/showthread...hreadid=573649


wmack

sorting a concatenated cell
 

well I can sort the data by the first name, but i want to sort it by the
last name. I have 3 years worth of data, so just changing the entry
method in not an option. Sorting a list of Dr's by first name is only
so useful....


--
wmack
------------------------------------------------------------------------
wmack's Profile: http://www.excelforum.com/member.php...o&userid=37801
View this thread: http://www.excelforum.com/showthread...hreadid=573649


Dave Peterson

sorting a concatenated cell
 
Use =Trim(), =Left(), and =Mid() to separate the names into parts once more.

But this time, don't delete those pieces. Just hide the columns if you want.

Then you can sort by each piece.

In fact, you can use a formula to concatenate the pieces into the full name.
But I'd do the data entry using those idividual fields.

wmack wrote:

I have a cell that is entered FIRSTNAME, LAST NAME. What I have done is
using TRIM LEFT MID and Finally Concatenate, switched the First name
with the last name in a different column. Now all I want to be able to
do is to sort the cells alphabetically. I am sure that I need to use
another approach to this.

--
wmack
------------------------------------------------------------------------
wmack's Profile: http://www.excelforum.com/member.php...o&userid=37801
View this thread: http://www.excelforum.com/showthread...hreadid=573649


--

Dave Peterson


All times are GMT +1. The time now is 12:32 AM.

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