Thread: sort an array
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default sort an array

http://www.standards.com/Sorting/Sor...scription.html
has some sorting algorithms

http://support.microsoft.com/default...b;en-us;169617
HOWTO: Sort Algorithms for Numeric Arrays

http://vbnet.mvps.org/code/sort/index.html
Randy Birch's site

--
Regards,
Tom Ogilvy


"Tim Williams" <saxifrax at pacbell dot net wrote in message
...
Greg,

If you want to sort within a worksheet UDF then you'll need to create a
routine to do the sorting: you can't use the worksheets Sort method.

Tim.


"Greg" wrote in message
...
Yes, I am calling it from a worksheet. For ex,
=interpolate("linear",value,C3:K3,C4:K4)

But I thought I could work with a range inside the VBA by creating an
"independent" range rngXY.

Apparently, I need to create an array and work with it? How would I

sort
an
array then?

Thanks

--
______
Regards,
Greg


"Tim Williams" wrote:

Are you calling the function from a worksheet?
UDF's cannot change the workbook in any way: they can only return

values.

Tim