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

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Special-K99

Well-known Member
Joined
Nov 7, 2006
Messages
8,426
Office Version
  1. 2019
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)

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

Special-K99

Well-known Member
Joined
Nov 7, 2006
Messages
8,426
Office Version
  1. 2019
Try

=INDIRECT(MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)&"!A1")
 
Upvote 0

adput

New Member
Joined
Sep 22, 2014
Messages
3
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

Teeroy

Well-known Member
Joined
Nov 9, 2012
Messages
2,244
Office Version
  1. 365
Platform
  1. Windows
Wouldn't that lead to a circular reference?
 
Upvote 0

Forum statistics

Threads
1,195,594
Messages
6,010,625
Members
441,558
Latest member
lambierules

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
Top