Hi,
The following function should sort a single column of data.
If it is run as a subroutine with the following added (wsbubble is the name of the sheet):
wsBubble.Range("C3:C12") = list
Then it works and prints out a number.
However if run as a function in excel (in cells c3:C12 as an array using =bubblesort) it returns a #value error.
Is there a way to fix this? Or can someone explain why this is not working?
Thanks in advance!
edit: forgot to mention, for an example, there is data in cells a2:a10 named "data" in excel.
The function being used in the cell is =bubblesort(data)
Here is the function:
Bookmarks