|
-
Nov 28th, 2005, 12:32 PM
#1
Thread Starter
Addicted Member
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 !
-
Nov 28th, 2005, 12:42 PM
#2
Re: Text Name Sorter... Help!
A thread just like this popped up recently in the Classic VB forum... check there...
-
Nov 28th, 2005, 01:23 PM
#3
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:
Private Sub QuickSort(C() As String, ByVal First As Long, ByVal Last As Long)
Dim Low As Long, High As Long
Dim MidValue As String
Low = First
High = Last
MidValue = C((First + Last) \ 2)
Do
While C(Low) < MidValue
Low = Low + 1
Wend
While C(High) > MidValue
High = High - 1
Wend
If Low <= High Then
Swap C(Low), C(High)
Low = Low + 1
High = High - 1
End If
Loop While Low <= High
If First < High Then QuickSort C, First, High
If Low < Last Then QuickSort C, Low, Last
End Sub
Private Sub Swap(ByRef A As String, ByRef B As String)
Dim T As String
T = A
A = B
B = T
End Sub
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Nov 28th, 2005, 10:32 PM
#4
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|