Populating multiple sheet names using Index, Match and Indirect

Darren_workforce

Board Regular
Joined
Oct 13, 2022
Messages
146
Office Version
  1. 365
Platform
  1. Windows
Hello,

My file contains 10 worksheets, each named after our unique phone queues. Each tab has a list of skilled agent names down Col A. On my Lookup tab, I have the formula below which references the name entered in B4 and then what I want it to do is list ALL worksheets that the name is located under.

EX: CustomerService, ConciergeClient, TechSupport.
EX: If Joe Smith was only skilled to CustomerService and ConciergeClient, the resulting formula should display those 2 queues into Lookup tab B7 where I have the formula setup.

However, the issue is that only the first worksheet name is populating. What do I need to tweak to make the formula successful?


Excel Formula:
=IFERROR(INDEX(SheetList,MATCH(1,--(COUNTIF(INDIRECT("'"&SheetList&"'!$A$1:$A$50"),B4)>0),0)),"")

Thank you in advance!!
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Are the 10 sheets all consecutive? If so what is the name of the 1st & last sheet?
 
Upvote 0
Are the 10 sheets all consecutive? If so what is the name of the 1st & last sheet?
The first sheet within 'SheetList' is OnlineAssistance. The last sheet is CSTMailings. The order of the sheets in the group do match with the order they appear at the bottom. However, they are not in alphabetical order.

There is an 11th sheet but it's not part of the 'SheetList' group. It's just Agent Lookup if that matters.
 
Last edited:
Upvote 0
Ok, in the Name manager create a new name (I called it ShtNames) & in the refers to box put
Excel Formula:
=TOCOL(TEXTAFTER(GET.WORKBOOK(1)&T(NOW()),"]",-1))
Then in the sheet you can use this formula
Excel Formula:
=LET(s,DROP(TAKE(ShtNames,XMATCH("CSTMailings",ShtNames)),XMATCH("OnlineAssistance",ShtNames)-1),v,VSTACK(OnlineAssistance:CSTMailings!A1:A50),t,TOCOL(IF(SEQUENCE(,ROWS(v)/ROWS(s)),s)),TOROW(FILTER(t,v=B4)))
Which will spill the sheet names along the row.

The workbook will need to be saved as an xlsm or xlsb & macros will need to be enabled.
 
Upvote 0
Ok, in the Name manager create a new name (I called it ShtNames) & in the refers to box put
Excel Formula:
=TOCOL(TEXTAFTER(GET.WORKBOOK(1)&T(NOW()),"]",-1))
Then in the sheet you can use this formula
Excel Formula:
=LET(s,DROP(TAKE(ShtNames,XMATCH("CSTMailings",ShtNames)),XMATCH("OnlineAssistance",ShtNames)-1),v,VSTACK(OnlineAssistance:CSTMailings!A1:A50),t,TOCOL(IF(SEQUENCE(,ROWS(v)/ROWS(s)),s)),TOROW(FILTER(t,v=B4)))
Which will spill the sheet names along the row.

The workbook will need to be saved as an xlsm or xlsb & macros will need to be enabled.
Is it possible to convert that to spill down a single column instead of across rows?
 
Upvote 0
Yup. you can use
Excel Formula:
=LET(s,DROP(TAKE(ShtNames,XMATCH("CSTMailings",ShtNames)),XMATCH("OnlineAssistance",ShtNames)-1),v,VSTACK(OnlineAssistance:CSTMailings!A1:A50),t,TOCOL(IF(SEQUENCE(,ROWS(v)/ROWS(s)),s)),FILTER(t,v=B4))
 
Upvote 0
Solution
Yup. you can use
Excel Formula:
=LET(s,DROP(TAKE(ShtNames,XMATCH("CSTMailings",ShtNames)),XMATCH("OnlineAssistance",ShtNames)-1),v,VSTACK(OnlineAssistance:CSTMailings!A1:A50),t,TOCOL(IF(SEQUENCE(,ROWS(v)/ROWS(s)),s)),FILTER(t,v=B4))
Sorry - impromptu meeting came up so response was a little late. @Fluff you're amazing as always!! Thank you for the assistance on this one.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,193
Members
452,616
Latest member
intern444

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