Unique values from date range
Assuming your data is in columns A & B, starting row 2:
In C2: =IF(AND($A2=$N$1,$A2<=$N$2),IF(COUNTIF($B$2:$B2,$ B2)=1,$B2,""),"")
and copy down
N1 & N2 contain your dates
in D2:
=IF(ROW()-ROW($D$2:$D$12)+1ROWS($C$2:$C$12)-COUNTBLANK($C$2:$C$12),"",INDIRECT(ADDRESS(SMALL(( IF($C$2:$C$12<"",ROW($C$2:$C$12),ROW()+ROWS($C$2: $C$12))),ROW()-ROW($D$2:$D$12)+1),COLUMN($C$2:$C$12),4)))
Enter with Ctrl+Shift+Enter (aaray formula) which wll put {} round the
formula.
Column D now contains your list
HTH
"tqm1" wrote:
Dear Sir,
I have following two columns as
-Date------Code
02-06-07----10
02-06-07----20
03-06-07----30
03-06-07----30
03-06-07----40
03-06-07----50
04-06-07----50
04-06-07----60
05-06-07----70
06-06-07----80
06-06-07----90
I am using dateformat="dd-mm-yy"
I wnat to fill Combobox1 with unique codes
between Date 03-06-07 to 04-06-07
The unique values are between date range a 30,40,50,60
Please help
--
tqm1
|