help with combo boxes and duplicate entrys

K

kevindict

Both hints worked great! Thank you so much. Now could you explain t
me what is happening so I know what to do in the future? I woul
really appreciate it.

Thanks again.
Kevi
 
M

Max

Glad to hear it worked for you !

Here's some additional explanation ..

Col C is the source col

Col D is where we do a unique items tagging on col C via
... COUNTIF($C$1:C1,C1)>1) ..
which expression returns TRUE for duplicates found
progressively in col C as we copy down

The OR( .. ) allows us to incorporate the other checks
(besides duplicates) such as checks for any "blank" cells,
or for the 2 expressions: "SUPERVISOR NAME" &
"EMPLOYEE NAME" that we don't want to include
in the final list for the DV which will be extracted in col B
(whatever we don't want to include, we'll make it blank "")

The final output in col D will hence be only the unique names
with blank cells ("") interspersed in-between

Col E simply assigns the row#s to col D for non-blank cells

The row# returns in col E are then read by the formula in col B
which auto-sorts in ascending order via the SMALL (...),
and uses OFFSET to return the items in col D matching the sorted
order returned by SMALL(...) nested inside MATCH(...)

The formula in col B includes an error trap:
IF(ISERROR(...),"",<OFFSET formula>) so that blanks ""
are returned instead of #NUM! errors as the range of row#s
in col E is sorted and exhausted when we copy down

The dynamic range formula for the named range: MyList
uses the return by SUMPRODUCT(--(Sheet1!$B$1:$B$100<>"")
to fix the "height" param in OFFSET(...)
so that we end up with a neat source list for the DV
which'll only include all the non-blank ("") cells

Note that the above is just one way of getting it done
which uses a couple of helper cols - cols D and E .. ,
there would be other neater, better ways out there

Check out also Debra Dalgleish's nice coverage of
Data Validation / dynamic ranges at:
http://www.contextures.com/xlDataVal01.html
http://www.contextures.com/xlNames01.html#Dynamic
 

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

Top