Cocatenation returns text string not formula result

Carty

Board Regular
Joined
Mar 3, 2009
Messages
76
Hi
In a worksheet I am trying to generate data using a formula that points to different workbooks on a network by concatenating text and cell values. The original formula looks like this:
code 1
Code:
=’\\Network address\customer\year\[order]worksheet’!cell reference

This works perfectly but the year, order and worksheet are variable. These values are defined in particular cells in the worksheet. Ideally I would write the formula as
code 2
Code:
='\\Network address\folder\customer\$B$1\[$C$1]$D$1’!cell reference

Secondly the order number is made up of letters and numbers but only the numbers are in cell C1 so the formula guidance would be
code 3
Code:
='\\Network address\folder\customer\$B$1\[text$C$1text]$D$1’!cell reference

I have managed to be able to arrive at the following:
code 4
Code:
=concatenate(“=‘\\Network address\folder\customer\”,$B$1,”\[text”,$C$1,”text]”,$D$1,”’!cell reference”

This just prints the formula in the cell rather than the outcome of the formula i.e.:
=‘\\Network address\folder\customer\$B$1\[text$C$1text]$D$1’!cell reference appears in the cell

Things I have tried;
The cell is formatted to General.
Using & rather than concatenate returns the same issue.
Using INDIRECT doesn't help - it returns an invalid cell reference ref error
code 5
Code:
=indirect(concatenate(etc, etc))

I don't have the ability to use EVAL (addin not added in! Not something I'm allowed to change)

Thank you

Paul
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Unless using code is ok, or you can ensure the source workbook is open, you're out of luck. If the source will be open, you can use INDIRECT.
 
Upvote 0
Thanks Rory

Opened the file and INDIRECT worked. Interestingly the value remained when the source file was closed.

Off to do some VBA then :)

Paul
 
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

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