View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Remotruker
 
Posts: n/a
Default Conditional Sorting


Pete_UK Wrote:
Assuming that column I is the one you want to sort on, you can add this
formula to J2:

=IF(i2<0,MIN(i:i) - i2 - 0.00001,i2)

then copy down for as many items as you have in column I. You can now
include column J in your sort range and sort on column J. Once sorted
you can delete column J. This will give you the sort order you
require,
i.e. -5, -6, -9, -100, -300, 5, 8, 15, 100 etc.

The reason for the 0.00001 is to ensure that the minimum value does
not
get treated as zero.

I don't understand the formula in your opening post - you are dividing
by 1(?)

Hope this helps.

Pete



Yes this helps so much :) . The divide by 1 was a mistake ,
i was dividing by -1 in a previous attempt.


--
Remotruker
------------------------------------------------------------------------
Remotruker's Profile: http://www.excelforum.com/member.php...o&userid=32082
View this thread: http://www.excelforum.com/showthread...hreadid=518379