Mapping job roles to access permissions

eeb

New Member
Joined
Sep 17, 2021
Messages
14
Office Version
  1. 2016
Platform
  1. MacOS
Hello,

I have two tables - one which maps employees to specific job roles, and another which maps the job roles to folder access permissions.

I am trying to make a third table, which will list all folders each employee should have access to, based on their job roles.

Example:

Sheet 1: Roles
FirstLastProduct DevelopmentDesignR & DDeploymentIT
Employee1XXXXX
Employee2X
Employee3X
Employee4XX
Employee5XXX

Sheet 2: Permissions
PermissionsProduct DevelopmentDesignR & DDeploymentITQuality Assurance
Section 1
Folder 1
Folder 2AA
Folder 3AAAAA
Folder 4
Section 2
Folder 5AAA
Folder 6AAAAAA
Folder 7A
Folder 8A
Section 3
Folder 9
Folder 10A
Folder 11A

Sheet 3:
RolesFolder permissions
Employee1Product Development
Design
R & D
Deployment
IT
Employee2Product Development
Employee3R & D
Employee4Product Development
R & D
Employee5Product Development
Deployment
IT

I have the formula to create a list of roles, but not of folders:
Cell C2: =TEXTJOIN(CHAR(10), TRUE, if(Roles!C3 ="X", Roles!$C$2, ""), if(Roles!D3="X", Roles!$D$2,""), if(Roles!E3="X", Roles!$E$2,""), if(Roles!F3="X", Roles!$F$2,""), if(Roles!G3="X", Roles!$G$2,""), if(Roles!H3="X", Roles!$H$2,""), if(Roles!I3="X", Roles!$I$2,""), if(Roles!J3="X", Roles!$J$2,""),if(Roles!K3="X", Roles!$K$2,""), if(Roles!L3="X", Roles!$L$2,""), if(Roles!M3="X", Roles!$M$2,""), if(Roles!N3="X", Roles!$N$2,""), if(Roles!O3="X", Roles!$O$2,""), if(Roles!P3="X", Roles!$P$2,""), if(Roles!Q3="X", Roles!$Q$2,""), if(Roles!R3="X", Roles!$R$2,""), if(Roles!S3="X", Roles!$S$2,""), if(Roles!T3="X", Roles!$T$2,""), if(Roles!U3="X", Roles!$U$2,""), if(Roles!V3="X", Roles!$V$2,""), if(Roles!W3="X", Roles!$W$2,""), if(Roles!X3="X", Roles!$X$2,""), if(Roles!Y3="X", Roles!$Y$2,""), if(Roles!Z3="X", Roles!$Z$2,""))
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
77,721
Office Version
  1. 365
Platform
  1. Windows
In that case can you post the amended formula
 

eeb

New Member
Joined
Sep 17, 2021
Messages
14
Office Version
  1. 2016
Platform
  1. MacOS
In that case can you post the amended formula
Cell E3=TEXTJOIN(CHAR(10),1,IF(Roles!$C3="X",IF(Permissions!$C$2:$C$22="A",Permissions!$B$2:$B$22,""),""),IF(Roles!$D3="X",IF(Permissions!$D$2:$D$22="A", Permissions!$B$2:$B$22,""),""),IF(Roles!$E3="X",IF(Permissions!$E$2:$E$22="A",Permissions!$B$2:$B$22,""),""))

Result is blank

Cell E4=TEXTJOIN(CHAR(10),1,IF(Roles!$C4="X",IF(Permissions!$C$2:$C$22="A",Permissions!$B$2:$B$22,""),""),IF(Roles!$D4="X",IF(Permissions!$D$2:$D$22="A", Permissions!$B$2:$B$22,""),""),IF(Roles!$E4="X",IF(Permissions!$E$2:$E$22="A",Permissions!$B$2:$B$22,""),""))

Result is all folders listed once
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
77,721
Office Version
  1. 365
Platform
  1. Windows
You haven't wrapped it in array formula like I suggested.
 

eeb

New Member
Joined
Sep 17, 2021
Messages
14
Office Version
  1. 2016
Platform
  1. MacOS
You haven't wrapped it in array formula like I suggested.
I was getting an error message when I did that, but it works today! Thank you so much for your help.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
77,721
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback.
 

Forum statistics

Threads
1,176,168
Messages
5,901,734
Members
434,914
Latest member
mabek

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
Top