Drop down list of users name in columns in order to reference a corresponding cell

sedwardson

New Member
Joined
Mar 2, 2023
Messages
35
Office Version
  1. 365
Platform
  1. Windows
Hopefully the title isn't too confusing but here is my question. I have a small spreadsheet with users names in columns and then a list of mapped drives above the users names. What I would like to do is have a drop down list (or open to another solution) to select a users name and then in the cell to the right of it, tell me which mapped drives that user is entitled to. The user will only appear once in each column so there shouldn't be any duplicates.

Here is my table to demonstrate what I am trying to achieve (obviously names taken out and replaced for example). I would like to drop down the list of users and select an individual and next to it I would like it to tell me what drive letters (mapped drives) need applying to them.

Drive lettersIMH, I, J, K, LH, J, LDrop Down List of UsersDrives To Be Mapped
MembersUser 1User 19User 24User 29
User 2User 20User 25User 30
User 3User 21User 26User 31
User 4User 22User 27
User 5User 23User 28
User 6
User 7
User 8
User 9
User 10
User 11
User 12
User 13
User 14
User 15
User 16
User 17
User 18

Many thanks for all and any help.

Kind regards

Sam
 
Another option that removes duplicate drive letters
Fluff.xlsm
ABCDEFGHIJK
1Drive lettersIMH, I, J, K, LH, J, LDrop Down List of UsersDrives To Be MappedOR
2User 1
3MembersUser 1User 19User 24User 29User 28M, H, I, J, K, LUser 2
4User 2User 20User 25User 30User 3
5User 3User 21User 26User 31User 4
6User 4User 22User 27User 28User 5
7User 5User 23User 28User 6
8User 6User 28User 7
9User 7User 8
10User 8User 9
11User 9User 10
12User 10User 11
13User 11User 12
14User 12User 13
15User 13User 14
16User 14User 15
17User 15User 16
18User 16User 17
19User 17User 18
20User 18User 19
21User 20
22User 21
23User 22
24User 23
25User 28
26User 24
27User 25
28User 26
29User 27
30User 29
31User 30
32User 31
33
Sheet4
Cell Formulas
RangeFormula
K2:K32K2=UNIQUE(TOCOL(B3:E100,1,1))
H3H3=TEXTJOIN(", ",,UNIQUE(TEXTSPLIT(TEXTJOIN(", ",,FILTER(TOCOL(IF(B3:E100<>"",B1:E1,1/0),2,1),TOCOL(B3:E100,1,1)=G3)),", "),1))
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
G3List=$K$2#
 
Upvote 1
Solution

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
@Royalbloodi please post all solutions to the board, rather than linking to files as per Rule#4 thanks
Sorry about that.

First off, I've modified a few things and got rid of some useless parts of some formulas.

So, for the Lookup sheet.

What I did was I titled the original sheet 'Lookup Sheet' and then added another named 'Information Sheet'.

On the 'Information Sheet' tab, I created the first set of columns for the First, Last names and Middle Initial as well as a place to input the Drives to be mapped.
There were no formulas for this part.

1699202252738.png


The second set of columns I created for the purpose of sorting the information. This is done with one formula in the upper right cell that references all the data in the first set and organizes it.

Excel Formula:
=SORT(B9:E56, 1, 1)

1699206230773.png


The third set of columns is to merge all the names into individual cells for easy reference with a formula and identify duplicates using Conditional Formatting.

1699207183585.png


For this one, I used TEXTJOIN to merge the names into one cell each. That formula is:
Excel Formula:
=TEXTJOIN(", ",TRUE, IF(G9:I9>0,G9:I9," "))
This also removes the commas if the cells are blank.
I then simply referenced the second set of columns to bring over the Drives to be mapped information. I then drag-filled the two separately and selected formatting only.

Finally, to identify duplicate information I used two different Conditional Formatting rules.

The first one is simply applying the Duplicate Rule to the top name in the name column.

1699207948796.png


Also, to stop this from highlighting the blank cells at the bottom of this column, you include another rule using the Formula to determine cells to format.

1699208361553.png


The formula for this rule should be =<cell name>="". In this case it is
Excel Formula:
=L9=""

Now we'll move to setting up the 'Lookup Sheet'.

For this, I made two columns and 25 rows for looking up information.

1699209057322.png


In the first line for the Employee column, I used Data Validation to set up a drop-down list that references our 'Information Sheet'

1699209280962.png


At this point, I'll draw your attention to a blank line I colored black on the 'Information Sheet'.

1699209795793.png


This blank is included in your range for your drop-down list because it makes the list start at the top each time you use it.
1699209960923.png


Finally, I put a rather long formula in the top cell of Drives to be mapped. This cell does multiple things.

Excel Formula:
=IFERROR(INDEX('Information Sheet'!$M$8:$M$81, MATCH(C3, 'Information Sheet'!$L$8:$L$81, 0)),"")

The IFERROR brackets get rid of the N/A if the cell is blank.
The INDEX/MATCH indexes the names and matches the Drives to be mapped to the relative name.

1699211134694.png


I hope that helps! :)
 

Attachments

  • 1699209643126.png
    1699209643126.png
    102.9 KB · Views: 2
Upvote 0
hahaha. i know you've got alot of answers that all works fine, let me make it hard for you by adding another option. LOL..


Book7
ABCDEFGHIJK
1MembersHIJKLMHelper ColumnDrop Down List of UsersDrive to be Mapped
2User 11IUser 31H
3User 21I
4User 31I
5User 41I
6User 51I
7User 61I
8User 71I
9User 81I
10User 91I
11User 101I
12User 111I
13User 121I
14User 131I
15User 141I
16User 151I
17User 161I
18User 171I
19User 181I
20User 1911L, M
21User 2011L, M
22User 2111L, M
23User 2211L, M
24User 2311L, M
25User 2411111H, I, J, K, L
26User 2511111H, I, J, K, L
27User 2611111H, I, J, K, L
28User 2711111H, I, J, K, L
29User 2811111H, I, J, K, L
30User 291H
31User 301H
32User 311H
Sheet1
Cell Formulas
RangeFormula
K2K2=VLOOKUP(J2,A:H,8,0)
H2:H32H2=TEXTJOIN(", ",,FILTER($B$1:$G$1,(B2:G2=1)))
Cells with Data Validation
CellAllowCriteria
J2List=$A$2:$A$32
 
Upvote 0
t
hahaha. i know you've got alot of answers that all works fine, let me make it hard for you by adding another option. LOL..


Book7
ABCDEFGHIJK
1MembersHIJKLMHelper ColumnDrop Down List of UsersDrive to be Mapped
2User 11IUser 31H
3User 21I
4User 31I
5User 41I
6User 51I
7User 61I
8User 71I
9User 81I
10User 91I
11User 101I
12User 111I
13User 121I
14User 131I
15User 141I
16User 151I
17User 161I
18User 171I
19User 181I
20User 1911L, M
21User 2011L, M
22User 2111L, M
23User 2211L, M
24User 2311L, M
25User 2411111H, I, J, K, L
26User 2511111H, I, J, K, L
27User 2611111H, I, J, K, L
28User 2711111H, I, J, K, L
29User 2811111H, I, J, K, L
30User 291H
31User 301H
32User 311H
Sheet1
Cell Formulas
RangeFormula
K2K2=VLOOKUP(J2,A:H,8,0)
H2:H32H2=TEXTJOIN(", ",,FILTER($B$1:$G$1,(B2:G2=1)))
Cells with Data Validation
CellAllowCriteria
J2List=$A$2:$A$32
this way, whenever you decided to add/delete another drive to be mapped by a user, you will just key in 1 or remove it to their respective column (drive letter)
 
Upvote 0
Another option that removes duplicate drive letters
Fluff.xlsm
ABCDEFGHIJK
1Drive lettersIMH, I, J, K, LH, J, LDrop Down List of UsersDrives To Be MappedOR
2User 1
3MembersUser 1User 19User 24User 29User 28M, H, I, J, K, LUser 2
4User 2User 20User 25User 30User 3
5User 3User 21User 26User 31User 4
6User 4User 22User 27User 28User 5
7User 5User 23User 28User 6
8User 6User 28User 7
9User 7User 8
10User 8User 9
11User 9User 10
12User 10User 11
13User 11User 12
14User 12User 13
15User 13User 14
16User 14User 15
17User 15User 16
18User 16User 17
19User 17User 18
20User 18User 19
21User 20
22User 21
23User 22
24User 23
25User 28
26User 24
27User 25
28User 26
29User 27
30User 29
31User 30
32User 31
33
Sheet4
Cell Formulas
RangeFormula
K2:K32K2=UNIQUE(TOCOL(B3:E100,1,1))
H3H3=TEXTJOIN(", ",,UNIQUE(TEXTSPLIT(TEXTJOIN(", ",,FILTER(TOCOL(IF(B3:E100<>"",B1:E1,1/0),2,1),TOCOL(B3:E100,1,1)=G3)),", "),1))
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
G3List=$K$2#
Thanks @Fluff , this worked a treat !
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
Another option that removes duplicate drive letters
Fluff.xlsm
ABCDEFGHIJK
1Drive lettersIMH, I, J, K, LH, J, LDrop Down List of UsersDrives To Be MappedOR
2User 1
3MembersUser 1User 19User 24User 29User 28M, H, I, J, K, LUser 2
4User 2User 20User 25User 30User 3
5User 3User 21User 26User 31User 4
6User 4User 22User 27User 28User 5
7User 5User 23User 28User 6
8User 6User 28User 7
9User 7User 8
10User 8User 9
11User 9User 10
12User 10User 11
13User 11User 12
14User 12User 13
15User 13User 14
16User 14User 15
17User 15User 16
18User 16User 17
19User 17User 18
20User 18User 19
21User 20
22User 21
23User 22
24User 23
25User 28
26User 24
27User 25
28User 26
29User 27
30User 29
31User 30
32User 31
33
Sheet4
Cell Formulas
RangeFormula
K2:K32K2=UNIQUE(TOCOL(B3:E100,1,1))
H3H3=TEXTJOIN(", ",,UNIQUE(TEXTSPLIT(TEXTJOIN(", ",,FILTER(TOCOL(IF(B3:E100<>"",B1:E1,1/0),2,1),TOCOL(B3:E100,1,1)=G3)),", "),1))
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
G3List=$K$2#
Hi @Fluff , is there way to list the names in the unique names range in alphabetical order? This is so that when searching in the drop down menu the names appear alphabetically. Thanks again for all your help.
 
Upvote 0
You can use
Excel Formula:
=sort(UNIQUE(TOCOL(B3:E100,1,1)))
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top