View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Lars-Åke Aspelin[_2_] Lars-Åke Aspelin[_2_] is offline
external usenet poster
 
Posts: 913
Default How to select the date?

On Sun, 23 Nov 2008 06:11:00 -0800, Eric
wrote:

Does anyone have any suggestions on how select the date?
There is a list of date under column A, and numbers under column B
02-Jan-08 1
06-Jan-08 2
06-Jan-08 0
12-Jan-08 1
16-Jan-08 1
20-Jan-08 3
21-Jan-08 4
23-Jan-08 4
24-Jan-08 3
30-Jan-08 2
01-Feb-08 3
03-Feb-08 3
06-Feb-08 3
07-Feb-08 2

I would like to select the date with higher numbers, the higher number and
smaller number in date always select firstly
It should show the result under D column, as show below
21-Jan-08
23-Jan-08
20-Jan-08
24-Jan-08
30-Jan-08
01-Feb-08
03-Feb-08
06-Feb-08
07-Feb-08
02-Jan-08
12-Jan-08
16-Jan-08
06-Jan-08

Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric


I think that 30-jan-08 has been misplaced in your example output.

Try this formula in cell C1:

=INDEX(A$1:A$14,MATCH(SMALL((-100000*(B$1:B$14)+(A$1:A$14)),ROW()),-100000*(B$1:B$14)+(A$1:A$14),0))

Note! This is an array formula that has to be entered by
SHIFT+CTRL+ENTER rather than just ENTER.

Change the 14 on all places to fit your size of data
(number of dates/numbers)

Hope this helps / Lars-Åke