Indirect and Match

shyguy44

Board Regular
Joined
Nov 3, 2007
Messages
88
Currently have

=IF(ISNUMBER(MATCH(A22, 'C:\MyDocs\[Test.xls]Sheet2'!$A$1:$A$5000,0)),'C:\MyDocs\[Test.xls]Sheet2'!A$1,"")

What I want to do is instead of using pathname above, create a path name in a cell then use indirect to refer to the path name but I'm struggling with it

Thanks
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
B4
red33378blue
yes
=IF(ISNUMBER(INDIRECT(J1)),"yes","no")
so J1 can contain any path you want

<colgroup><col width="64" span="11" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0
Not sure how it will check for a22, which I want to copy the formula down. Also not sure now if indirect will work for closed workbooks
 
Upvote 0
=if(iserror(match........),blank, your formula) ............reference the closed workbook directly

you can build the path as a series of text segments - I forget how - start a new thread to get someone to solve that bit
 
Upvote 0

Forum statistics

Threads
1,215,036
Messages
6,122,794
Members
449,095
Latest member
m_smith_solihull

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