LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.newusers
JLatham
 
Posts: n/a
Default alphabetical order within a cell

Ok - simply put, we could have done this with functions in cells, but we
would have had to take a very long trip through the woods to get to where we
wanted to be. The code solution was, in my opinion, easiest to implement.
But I could have done some things to make it a little better even.

By being generic, I mean it works for any group of text in a cell, not just
the types of entries you had. It is independent of length of the groups in a
cell even. Try typing in "the quick brown fox jumped over the lazy dog" in a
cell and running the code against that cell. :-)

"David" wrote:

Have to say that that didn't make a whole lot of sense. Double dutch?
Anyway, thanks again. Only fault is that it would have been perfect had it
ordered by number as well [not just by anything that began with '1'.

--
David Kitching Msc. Msc.
Managing Director
Natural Deco Ltd.
The Manor
Manor Lane
Loxley
Warwickshire CV35 9JX
UK.

Tel: +44 (0) 1789 470040
Mob: +44 (0) 7799 118518
www.naturaldeco.co.uk

"JLatham" wrote in message
...
You're welcome. Excel is easy to use. Just some things that don't have
built in functions to solve. This actually could have been done on a
worksheet using some of the text parsing functions people have built and
then
using the Data | Sort feature and then concatenating the results back into
a
string. But that would have been a lot more manual work for you. Having
a
variable number of state IDs in the cells was also something that I
thought
about and it would have complicated the worksheet solution.

By the way, that is a very generic solution. It would work on any text
contained in a single cell, including variable length strings like perhaps
a
list of names or colors or such. I think that it could be improved by
coding
up a different sort, say a heap or shell sort, but for short lists, the
simple bubble works fine enough.

"David" wrote:

Wow. And here I was thinking that Excel was easy to use. But I've pasted
this code into the VB [takes me back] editor and run it, all in the
correct
manner purely by fluke, and it worked fantastically. Thank you.

David







 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
up to 7 functions? ALex Excel Worksheet Functions 10 April 12th 05 06:42 PM


All times are GMT +1. The time now is 10:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"