Sorting text strings automatically

Mark McInerney

Active Member
Joined
Apr 4, 2012
Messages
259
Office Version
  1. 365
Platform
  1. Windows
Hi Folks - Thanks in advance for taking the time to review this.

I have a range of random text strings in column A1:A50.

Is there a way to sort automatically any information entered in Column A1:A50, in the adjoining column B1:B50.

Thanks.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
How about
Excel Formula:
=SORT(A1:A50)
 
Upvote 0
Dont know what you have but maybe this suits
Book1
AB
1abc xyz def jhi klm abc xyz def jhi klm
2jhicde
3mbijhi
4cdembi
Sheet1
Cell Formulas
RangeFormula
B1:B4B1=SORT(A1:A4,1,1,FALSE)
Dynamic array formulas.
 
Upvote 0
Hi,

Thanks for reviewing my query - you can see the sort output of column A in Column C, I then use an xlookup to return the values in Column B, in Column D, but they are duplicating - is there a way to return the unique values from Column B in Column D?

AdminMargaret McGurranAdminMargaret McGurran
CaramicoNiamh DevaneyAdminMargaret McGurran
DeliGillian RooneyBakerySophie Russell
BakerySophie RussellBakerySophie Russell
BakeryCollette MatthewsBakerySophie Russell
BakeryKate SmullenBakerySophie Russell
Burger BuffMichael DavittBakerySophie Russell
Burger BuffAdam DalyBurger BuffMichael Davitt
Burger BuffDaniel MoodyBurger BuffMichael Davitt
Burger BuffZoe EnnisBurger BuffMichael Davitt
Burger BuffJack Cox JessopBurger BuffMichael Davitt
Burger BuffJack NugentBurger BuffMichael Davitt
CaramicoZahra AsadsalesBurger BuffMichael Davitt
BakeryCarmel McLoughlinCaramicoNiamh Devaney
CaramicoDarragh GlynnCaramicoNiamh Devaney
CaramicoDylan CrowleyCaramicoNiamh Devaney
AdminNina FitzpatrickCaramicoNiamh Devaney
BakeryNicole DoranCaramicoNiamh Devaney
CaramicoNiamh CareyCaramicoNiamh Devaney
CaramicoRiley PeytonDeliGillian Rooney
DeliMarie RussellDeliGillian Rooney
DeliPaulina SzlapczynskaDeliGillian Rooney
DeliRebecca EnnisDeliGillian Rooney
DeliSophie HynesDeliGillian Rooney
 
Upvote 0
Is this what you mean
Fluff.xlsm
ABCD
1
2AdminMargaret McGurranAdminMargaret McGurran
3CaramicoNiamh DevaneyAdminNina Fitzpatrick
4DeliGillian RooneyBakerySophie Russell
5BakerySophie RussellBakeryCollette Matthews
6BakeryCollette MatthewsBakeryKate Smullen
7BakeryKate SmullenBakeryCarmel McLoughlin
8Burger BuffMichael DavittBakeryNicole Doran
9Burger BuffAdam DalyBurger BuffMichael Davitt
10Burger BuffDaniel MoodyBurger BuffAdam Daly
11Burger BuffZoe EnnisBurger BuffDaniel Moody
12Burger BuffJack Cox JessopBurger BuffZoe Ennis
13Burger BuffJack NugentBurger BuffJack Cox Jessop
14CaramicoZahra AsadsalesBurger BuffJack Nugent
15BakeryCarmel McLoughlinCaramicoNiamh Devaney
16CaramicoDarragh GlynnCaramicoZahra Asadsales
17CaramicoDylan CrowleyCaramicoDarragh Glynn
18AdminNina FitzpatrickCaramicoDylan Crowley
19BakeryNicole DoranCaramicoNiamh Carey
20CaramicoNiamh CareyCaramicoRiley Peyton
21CaramicoRiley PeytonDeliGillian Rooney
22DeliMarie RussellDeliMarie Russell
23DeliPaulina SzlapczynskaDeliPaulina Szlapczynska
24DeliRebecca EnnisDeliRebecca Ennis
25DeliSophie HynesDeliSophie Hynes
Report
Cell Formulas
RangeFormula
C2:D25C2=SORT(A2:B25)
Dynamic array formulas.
 
Upvote 0
Yes - My formula in Column D is the following - how did you stop the values duplicating in Column D? Thanks for having a look at this - appreciated.

"=INDEX($C$4:$C$27,MATCH(D4,$B$4:$B$27,0))"
 
Upvote 0
Sorry - The formula is visible on Column C, but not for some reason on Column D? Apologies.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,707
Members
448,981
Latest member
recon11bucks

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