Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unique values from date range

0 views
Skip to first unread message

tqm1

unread,
Jun 28, 2007, 12:21:15 AM6/28/07
to

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 are: 30,40,50,60

Please help


--
tqm1

Toppers

unread,
Jun 28, 2007, 3:04:01 AM6/28/07
to
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)+1>ROWS($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

0 new messages