View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default How to select the date?

Read it that you're asking to auto-sort the dates in col A
by the numbers in col B (in descending order)

In C1: =IF(B1="","",B1-ROW()/10^10)
In D1: =INDEX(A:A,MATCH(LARGE(C:C,ROWS($1:1)),C:C,0))
Select C1:D1, copy down. Format col D as dates. Minimize/hide col C. Col D
returns the required auto-sorted dates from col A. Any dates with tied
numbers in col B (ties) will be returned in the same relative order that they
appear within the source.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,500 Files:363 Subscribers:64
xdemechanik
---
"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