How can I use a formula to sort text values?

stuckagain22

Board Regular
Joined
Aug 4, 2006
Messages
183
I have a sheet that I want to auto sort the data in one column into another column.

In Example:

If column A contains:

peach
apple
orange

I want column B to then show:

apple
orange
peach

Is there anyway to do this using a function/formula?
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
In C1 (fill down)
=IF(ISBLANK(A1),300,CODE(A1))

In column B
=INDEX(A:A,MATCH(SMALL(C:C,ROW()),C:C,0),1)
 
Upvote 0
Thanks, but this only indexes the value of the first text character. If there are several values that start with the same character, then they would not be alphabetical ie:

peach
pear
pomegranate
 
Upvote 0
Thanks, but this only indexes the value of the first text character. If there are several values that start with the same character, then they would not be alphabetical ie:

peach
pear
pomegranate

If you have already installed the free morefunc.xll add-in...
Book5
ABCD
15
2peachapple
3pearcranberry
4pomegranatepeach
5applepear
6cranberrypomegranate
7 
Sheet1


C1:

=COUNTA(A2:A6)

C2, copied down:

=IF(ROWS($C$2:C2)<=$C$1,INDEX(VSORT($A$2:$A$6,$A$2:$A$6,1),ROWS($C$2:C2)),"")
 
Upvote 0

Forum statistics

Threads
1,218,620
Messages
6,143,523
Members
450,492
Latest member
Rusbus1972

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top