Unique values from date range

T

tqm1

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 hel
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Calculation in Date Range 1
Macro in Excel 2
Find within Date Range 4
Find Period Date? 5
Date range 1
dates max & min 11
vlookup using match and date range 1
UNABLE TO SORT DATE 1

Top