sort 12 strings into alphabetical order

merlin777

Well-known Member
Joined
Aug 29, 2009
Messages
1,397
Office Version
  1. 2007
I have 12 cells, e.g. A1 to A12, each with a text string (which come from elsewhere in the workbook).

I want a formula to make the 12 strings appear sorted into alphabetical order in a13 to a24.

I've posted the request before including blank cell removal but in spite of some great contributions we never arrived at a solution so I've worked on simplifying the requirement by removing the blanks another way.

All help greatly appreciated!
 
I copied your code and changed the 549 to 557. The range changed to 'noblankrangemon' as before. I'm getting the same result as before.

There isn't any reason why it would work with a formula in the cell rather than directly typed text is there?
 
Upvote 0

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
I've just tried deleting and re-entering it. Oddly, excel has stopped changing the array to the array name.
 
Upvote 0
I tried changing my original data set to some text I entered manually to see what would happen. My single line of text in the results range has moved up one but here's the bizarre thing - it's not showing a string from my data set. The only place this appears in this column L is row 55.

Excel Workbook
L
546mon
547tue
548wed
549thu
550fri
551sat
552jan
553feb
554mar
555apr
556may
557jun
55811:30physiotherapy/Nursey NurseCHANGE DRESSINGS
559 
560 
561 
562 
563 
564 
565 
566 
567 
568 
569 
Sheet1
 
Upvote 0
the 0 at the end of the last 12 formulae is actually a 1 as per your formula (I mixed up my pastings) but the result was the same with a 1 or a 0.
 
Upvote 0
do you think that these cells holdiing a formula that returns text rather that text itself should make a difference?
 
Upvote 0
sorted!

i needed to add a '+500' here:

=INDEX($L:$L,500+ 100*MOD

After some investigating I found the formula was sorting L46:L57 rather than L546:L547. I don't really understand the formula so I'm not sure why but this works...
 
Upvote 0

Forum statistics

Threads
1,215,955
Messages
6,127,926
Members
449,411
Latest member
AppellatePerson

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