Index Match

ekhawaja

Board Regular
Joined
Dec 16, 2018
Messages
60
Office Version
  1. 365
Hello,

How can I modify the formula, I would like to do a search across sheet 2, sheet 3 and sheet 4 for a value in sheet 1?

=INDEX([sheet2!$W:$W,MATCH($sheet1!AJ5,[sheet2!$E:$E,0)

Thanks in advance!
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Try...

Excel Formula:
=LET(SheetList,{"Sheet2","Sheet3","Sheet4"},LookupSheet,INDEX(SheetList,MATCH(TRUE,COUNTIF(INDIRECT("'"&SheetList&"'!E:E"),AJ5)>0,0)),INDEX(INDIRECT("'"&LookupSheet&"'!W:W"),MATCH(AJ5,INDIRECT("'"&LookupSheet&"'!E:E"),0)))

or

Excel Formula:
=LET(SheetList,$AM$5:$AM$7,LookupSheet,INDEX(SheetList,MATCH(TRUE,COUNTIF(INDIRECT("'"&SheetList&"'!E:E"),AJ5)>0,0)),INDEX(INDIRECT("'"&LookupSheet&"'!W:W"),MATCH(AJ5,INDIRECT("'"&LookupSheet&"'!E:E"),0)))

...where AM5:AM7 contains the list of sheet names.

Hope this helps!
 
Upvote 1
Solution
1693708967972.png
 
Upvote 0
attached is the sheet names list. Please note, sheet are in a different file.
 

Attachments

  • Screenshot 2023-09-02 204914.png
    Screenshot 2023-09-02 204914.png
    41.4 KB · Views: 5
Upvote 0
Try...

Excel Formula:
=LET(SheetList,{"Sheet2","Sheet3","Sheet4"},LookupSheet,INDEX(SheetList,MATCH(TRUE,COUNTIF(INDIRECT("'"&SheetList&"'!E:E"),AJ5)>0,0)),INDEX(INDIRECT("'"&LookupSheet&"'!W:W"),MATCH(AJ5,INDIRECT("'"&LookupSheet&"'!E:E"),0)))

or

Excel Formula:
=LET(SheetList,$AM$5:$AM$7,LookupSheet,INDEX(SheetList,MATCH(TRUE,COUNTIF(INDIRECT("'"&SheetList&"'!E:E"),AJ5)>0,0)),INDEX(INDIRECT("'"&LookupSheet&"'!W:W"),MATCH(AJ5,INDIRECT("'"&LookupSheet&"'!E:E"),0)))

...where AM5:AM7 contains the list of sheet names.

Hope this helps!
thanks for the reply.
 
Upvote 0
First, when listing your sheet names, don't include the exclamation ( ! ) at the end of the name. So it should be [Stewardship.xlsm]Mechanical, etc.

Secondly, the lookup workbook must be open.

Hope this helps!
 
Upvote 0
First, when listing your sheet names, don't include the exclamation ( ! ) at the end of the name. So it should be [Stewardship.xlsm]Mechanical, etc.

Secondly, the lookup workbook must be open.

Hope this helps!
yes, it is working now! yes, it only works while workbooks are open. Thanks so much !!
 
Upvote 0

Forum statistics

Threads
1,215,068
Messages
6,122,950
Members
449,095
Latest member
nmaske

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