Solved

Dropdown with Dependency and Exclusion of Selection...

Posted on 2014-02-21
8
237 Views
Last Modified: 2014-02-23
I'm trying to see if there's a simple way to have a dropdown that a user can use to choose from a list, and when they move to any other row that has the same selection in the same column they can select any item in the list that hasn't been selected already.

I'm building a move list for people moving to new spaces at an office and would like a function that helps the different departments select the office numbers of each employee, and I'd like to send them a spreadsheet with all their names with a column for them to select office locations off a list, which generally looks like:

Office1a
Office1b
Office1c
Office1d
etc., etc., etc.,

I am going to use a dependent dropdown to give each manager a select choice of offices, but as they select offices in their list I don't want them to be able to select the same office for anyone else on their team so they do not put two people in the same office.

Is there a simple way to accomplish this without necessarily writing a function or macro (trying to avoid sending a macro notebook as people tend to hate those).
0
Comment
Question by:TechnologyMangu
  • 3
  • 3
  • 2
8 Comments
 
LVL 21

Expert Comment

by:Ejgil Hedegaard
ID: 39879073
Try this.
With all office names in one list, and a formula in the list to select from, already used names will be blank.

=IF(ISERROR(MATCH(B2,Sheet1!B:B,0)),B2,"")

Lists on Sheet2, selection on Sheet1.
Exclude-from-list.xlsx
0
 
LVL 21

Expert Comment

by:Ejgil Hedegaard
ID: 39879237
Another solution with no blanks between selections.
Exclude-from-list-no-blanks.xlsx
0
 

Author Comment

by:TechnologyMangu
ID: 39879516
How would I make it dependent on the managers? Is that with validation based on the managers name?
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 21

Assisted Solution

by:Ejgil Hedegaard
Ejgil Hedegaard earned 200 total points
ID: 39879693
A solution to first select manager for employee, then office depending on manager selection.
Exclude-from-list-with-managers.xlsx
0
 

Author Comment

by:TechnologyMangu
ID: 39880169
Last, but not least, how do I get rid of the extra spaces when offices are selected in the drop-down? Seems the list keeps the "empty" space of where an office existed in the list...
0
 
LVL 81

Accepted Solution

by:
byundt earned 300 total points
ID: 39880192
I modified hgholt's workbook to exclude the blanks in the data validation dropdowns.

To do so, I created a named range Offices, with a "Refers to" property of:
=Sheet2!$G$4:INDEX(Sheet2!$G$4:$G$1000,COUNTA(Sheet2!$C$4:$C$1000))

I then used the following array-entered (Control + Shift + Enter) formula in Sheet2 cell G4, copied down:
=IFERROR(INDEX(F$4:F$1000,SMALL(IF((F$4:F$1000<>"")*(C$4:C$1000=C4),ROW(F$4:F$1000)-ROW(F$4)+1,""),COUNTIF(C$4:C4,C4))),"")

And then the following data validation Source in Sheet1 cell D2:
=OFFSET(INDEX(Offices,MATCH(B2,INDEX(Office,,1),0)),0,0,COUNTIFS(INDEX(Office,,1),B2,Offices,"?*"))
Exclude-from-list-with-managersQ.xlsx
0
 

Author Comment

by:TechnologyMangu
ID: 39880213
Something is wrong when I try to use this sheet and the formulas in it - while yours appears to work it evaluates to errors in my file.
0
 
LVL 81

Expert Comment

by:byundt
ID: 39880832
When you apply the data validation formula to a row with no manager chosen, you will get an error message that it evaluates to an error. If you ignore the error, it will work once you choose the manager.

If you are still having problems with implementation, please post your workbook including any attempts you have made to make the formulas work.

Brad
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question