Okay, you will need to alphabetize your list for this to work.
Select A1:D26 > Custom Sort
by Business, then Add a level, by Division, Add a level, by Department
In F2 copied down, this ARRAYED Formula
=IFERROR(INDEX($A$2:$A$26,SMALL(IF(COUNTIF($F$1:F1,$A$2:$A$26)=0, ROW($A$2:$A$26)-1), ROWS($A$1:$A1))),"")
...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
Then in Name Manager (Formula tab),
DivA =INDEX(Sheet1!$B$2:$B$26, MATCH(Test!$A$2, Sheet1!$A$2:$A$26,0)): INDEX(Sheet1!$B$2:$B$26, MATCH(Test!$A$2, Sheet1!$A$2:$A$26))=INDEX(Sheet1!$B$2:$B$26, MATCH(Test!$A$2, Sheet1!$A$2:$A$26,0)): INDEX(Sheet1!$B$2:$B$26, MATCH(Test!$A$2, Sheet1!$A$2:$A$26)
This formula pulls the range of cells relevant to the business chosen in sheet "Test"
Then in G2 copied down, this Arrayed formula
=IFERROR(INDEX(DivA,SMALL(IF(COUNTIF($G$1:G1,DivA)=0, ROW(DivA)-INDEX(ROW(DivA),1)+1), 1)),"")
Then back in Name Manager,
DepartA =INDEX(Sheet1!$C$2:$C$26, MATCH(Test!$A$4, DivA,0)+INDEX(ROW(DivA),1)-2):INDEX(Sheet1!$C$2:$C$26, MATCH(Test!$A$4, DivA)+INDEX(ROW(DivA),1)-2)
this pulls the range dependent on what Division was picked in sheet "Test"
Then H2 copied down, this ARRAYED Formula
=IFERROR(INDEX(DepartA,SMALL(IF(COUNTIF($H$1:H1,DepartA)=0, ROW(DepartA)-INDEX(ROW(DepartA),1)+1), 1)),"")
Then in Name Manager
Group =INDEX(Sheet1!$D$2:$D$26, MATCH(Test!$A$6, DepartA,0)+INDEX(ROW(DepartA),1)-2):INDEX(Sheet1!$D$2:$D$26, MATCH(Test!$A$6, DepartA)+INDEX(ROW(DepartA),1)-2)
Then in I2 copied down, this (not arrayed) formula
=IFERROR(INDEX(Group,ROWS($A$1:$A1)),"")
Lastly, for purposes of using data validation and dropdown menus, in the name manager
Business = Sheet1!$F$2:INDEX(Sheet1!$F$2:$F$21, SUMPRODUCT(--(LEN(Sheet1!$F$2:$F$21)>0)))
Division =Sheet1!$G$2:INDEX(Sheet1!$G$2:$G$21, SUMPRODUCT(--(LEN(Sheet1!$G$2:$G$21)>0)))
Department =Sheet1!$H$2:INDEX(Sheet1!$H$2:$H$21, SUMPRODUCT(--(LEN(Sheet1!$H$2:$H$21)>0)))
See attachment
Bookmarks