Add value from another cell into formula

adput

New Member
Joined
Sep 22, 2014
Messages
3
I'm using this formula to get the value of a cell from a sheet in another workbook:

=[workbook2.xlsx]sheet1!A1

I have a second formula that gets the name of the sheet itself:

=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-FIND("]",CELL("filename",A1),1))

I want to change the first formula so it automatically gets the name of the sheet from the second formula.

Eg; if the second formula for the sheet name is in C1

=[workbook2.xlsx]C1!A1 - which doesn't work - it's probably (hopefully) really simple?
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)

works but the sheet has to be saved first (I believe).
 
Upvote 0
Try

=INDIRECT(MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)&"!A1")
 
Upvote 0
Really appreciate the help - I'm a little confused now though :confused:

How do I use the formula to find a value in a cell in another workbook?
 
Upvote 0
Wouldn't that lead to a circular reference?
 
Upvote 0

Forum statistics

Threads
1,214,942
Messages
6,122,366
Members
449,080
Latest member
Armadillos

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