Look Up Sheet Name in Workbook Based on Cell Value

JLeibovitz

New Member
Joined
Apr 10, 2013
Messages
6
What I'm looking to do:
I'm hoping someone knows how to use either a formula or VBA to lookup a value in A2:A200 and populate column J2:J200 with the Sheet Name that value is found on. I've built a workbook that assembles a list of items across multiple sheets using the following name definitions and formulas:

NAME MANAGER:

Arry1: =MMULT(0+(ROW(INDIRECT("1:"&COUNTA(Sheets)))>=TRANSPOSE(ROW(INDIRECT("1:"&COUNTA(Sheets))))),TRANSPOSE(COUNTIF(INDIRECT("'"&Sheets&"'!B2:B200"),"SL1")))
Sheets: ={"Product","Games as a Service","Marketing"}

Formulas on "SL1 Worksheet" (List page):
To define how many items across the workbook that fit my criteria and inform the list building =SUMPRODUCT(COUNTIF(INDIRECT("'"&Sheets&"'!B2:B200"),"SL1"))
The array formula being used in A2 to build the list (copy-pasted across A2:H200) =IF(ROWS($1:1)>$J$1,"",INDEX(INDIRECT("'"&INDEX(Sheets,MATCH(TRUE,Arry1>=ROWS($1:1),0))&"'!A2:i200"),SMALL(IF(INDIRECT("'"&INDEX(Sheets,MATCH(TRUE,Arry1>=ROWS($1:1),0))&"'!B2:B200")="SL1",ROW(INDIRECT("1:"&ROWS($A$3:$I$200)))),IFERROR(1+ROWS($1:1)-LOOKUP(ROWS($1:1),1+Arry1),ROWS($1:1))),COLUMNS($A:A)))


Any ideas? I know that putting =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256) in a cell on the worksheet results in the name of that worksheet being printed in the cell, but I've got zero clue how to put that into any good use here.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,214,976
Messages
6,122,539
Members
449,088
Latest member
RandomExceller01

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