Results 1 to 4 of 4

Thread: Text Name Sorter... Help!

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2004
    Location
    Ohio
    Posts
    153

    Text Name Sorter... Help!

    I was wondering if anyone has made something that organized names in a text editor.

    Say if there were these names.....
    Andrew
    Josh
    Nick
    Zack
    Andrew
    Nick
    Nick
    Josh
    Andrew
    .....It would put them in order, like all the Andrews in one spot, then all the Nicks, etc...

    So when it got done organizing it would look something like this.....
    Andrew
    Andrew
    Andrew
    Josh
    Josh
    Nick
    Nick
    Nick
    Zack

    If someone made or will make a program to do this, please let me know!

    Thanks !

  2. #2
    Banned timeshifter's Avatar
    Join Date
    Mar 2004
    Location
    at my desk
    Posts
    2,465

    Re: Text Name Sorter... Help!

    A thread just like this popped up recently in the Classic VB forum... check there...

  3. #3
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Text Name Sorter... Help!

    put them in Excel and sort??
    or are u talking an array?
    or a text file?

    I have code that sorts arrays...
    VB Code:
    1. Private Sub QuickSort(C() As String, ByVal First As Long, ByVal Last As Long)
    2.     Dim Low As Long, High As Long
    3.     Dim MidValue As String
    4.    
    5.     Low = First
    6.     High = Last
    7.     MidValue = C((First + Last) \ 2)
    8.    
    9.     Do
    10.     While C(Low) < MidValue
    11.     Low = Low + 1
    12.     Wend
    13.    
    14.     While C(High) > MidValue
    15.     High = High - 1
    16.     Wend
    17.    
    18.     If Low <= High Then
    19.         Swap C(Low), C(High)
    20.         Low = Low + 1
    21.         High = High - 1
    22.     End If
    23. Loop While Low <= High
    24.  
    25. If First < High Then QuickSort C, First, High
    26. If Low < Last Then QuickSort C, Low, Last
    27. End Sub
    28.  
    29. Private Sub Swap(ByRef A As String, ByRef B As String)
    30.     Dim T As String
    31.    
    32.     T = A
    33.     A = B
    34.     B = T
    35. End Sub
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Dec 2004
    Location
    Ohio
    Posts
    153

    Re: Text Name Sorter... Help!

    I'm talking about a text file, I just need the text from say notepad organized alphabetically.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width