If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Sorting an Array of numbers

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-13-10, 07:35
michaeldavid michaeldavid is offline
Registered User
 
Join Date: Dec 2004
Posts: 35
Sorting an Array of numbers

Hi,

I have a procedure that creates a 1 dimension array of random numbers that I need to sort into ascending order. The array could be as short as 10 numbers or could be 10,000, so speed may be an isssue, but for the moment actually working is my main concern.

I used a function by J Walkenbach that sorts them into order, but the array returned rounds the numbers to integers.

Does anyone have a function that does not convert the numbers.

Mike
Reply With Quote
  #2 (permalink)  
Old 12-13-10, 10:24
Colin Legg Colin Legg is offline
Registered User
 
Join Date: Sep 2008
Location: London, UK
Posts: 495
Hi Mike,

The procedure, which I expect is a bubble sort, probably uses Long data types. To preserve decimal places use Double data types.
__________________
Colin

RAD Excel Blog

Other tutorials:
Array Formulas | Deleting Rows with VBA
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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