I hope that I have understood you correctly. This array formula will search the data for one name and up to three Branches and will return all matching values. Array Formulae are a little different from ordinary formulas in that they MUST be 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 the outside of your formula. If you do not CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.
Don't type the curly braces yourself - it won't work...
Formula:
=IFERROR(IFERROR(IFERROR(INDEX(B:B,SMALL(IF($A$2:$A$10=$H$1,IF($C$2:$C$10=$H$2,ROW($C$2:$C$10))),ROWS($1:1))),INDEX(B:B,SMALL(IF($A$2:$A$10=$H$1,IF($C$2:$C$10=$I$2,ROW($C$2:$C$10))),ROWS($1:1)-COUNTIFS($A:$A,$H$1,$C:$C,$H$2)))),INDEX(B:B,SMALL(IF($A$2:$A$10=$H$1,IF($C$2:$C$10=$J$2,ROW($C$2:$C$10))),ROWS($1:1)-(COUNTIFS($A:$A,$H$1,$C:$C,$H$2)+(COUNTIFS($A:$A,$H$1,$C:$C,$I$2)))))),"")
copied across and down.
Bookmarks