LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel VBA - Sort a table with BubbleSort

Hello,

I need to sort a table with BubbleSort.

I know how the algorithm works:

For i = left To right - 1
If student_temp(i) student_temp(i + 1) Then
Call swap(i, i + 1)
End If


Private Sub swap
Dim hold As String

hold = student_temp(j)
student_temp(j) = student_temp(k)
student_temp(k) = hold


but I have no idea how this works on an Excel sheet. How do I access
the rows? Do I need an array?

I will appreciate any help.

Thanks in advance


---
Message posted from http://www.ExcelForum.com/

 
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
Pivot Table sort -Excel 2007 Lisa F Excel Discussion (Misc queries) 4 November 6th 08 11:37 PM
How do I sort a table by last name and first name in Excel? Kubbybear18 Setting up and Configuration of Excel 2 December 2nd 06 02:47 PM
How import table and have Excel sort automatically? Kristina Margarita Excel Discussion (Misc queries) 0 September 15th 06 05:28 PM
When I try to sort in Excel only part of the table sorts jrw562 Excel Discussion (Misc queries) 6 March 5th 06 08:31 PM
how do i sort a table in excel trey braid Excel Worksheet Functions 5 January 26th 06 03:55 AM


All times are GMT +1. The time now is 01:41 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"