Would anyone be able to explain why a formula doesn’t work when I use a concatenate but works when I don’t.

Carty

Board Regular
Joined
Mar 3, 2009
Messages
76
Hi

This should be simple but I am finding it baffling

The formula that works:
Code:
=Match(B4,'\\network address\folder\[file.xlsx]sheet'!$E:$E,)

I get the result 12. My understanding is that this is the row which the value of B4 on the current sheet is found in column E on the specified (different) sheet.

However I would like to use a cell reference on the current sheet to determine the sheet on which to look by using
Code:
=Match(B4,Concatenate("'\\network address\folder\[file.xlsx]",D4&" Text","'!",”$E:$E”),)

It gives me a #VALUE error and I don’t know why.

Stripping out the Concatenate part of the formula it gives me, I believe, the correct format i.e.

Code:
=Concatenate("'\\network address\folder\[file.xlsx]",D4&" Text","'!",”$E:$E”),)

Gives me '\\network address\folder\[file.xlsx]D4 Text'!$E:$E where "D4 Text" is the sheet name, which matches the format in the formula above.

Any enlightenment gratefully received

Thanks

Paul
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Because when you explicitly defined the workbook path and name, it was an address, and Excel was able to resolve it. When you use CONCATENATE, you are creating a text string, not an address. It looks like an address, but it's not. In order to convert a text to an address, you can surround it with the INDIRECT function. However, more bad news, INDIRECT does not work on closed workbooks. In order to do what you want, you may need to use VBA in some form.
 
Upvote 0

Forum statistics

Threads
1,214,830
Messages
6,121,834
Members
449,051
Latest member
excelquestion515

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