Lookup Via sheet Name

rpaulson

Well-known Member
Joined
Oct 4, 2007
Messages
1,415
here is my formula.

=HLOOKUP(A1,'[TimeCard Summary (Responses) (1).xlsx]Form Responses 1'!$1:$2,2,0)

it works, but I would like to change the sheet name "Form Responses 1" to a cell referance.



ex: if cell B1 = Form Responses 1
=HLOOKUP(A1,'[TimeCard Summary (Responses) (1).xlsx]B1!$1:$2,2,0)

thanks,

Ross
 
Last edited:

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
You need Indirect for that.

=HLOOKUP(A1,INDIRECT("'[TimeCard Summary (Responses) (1).xlsx]" & B1 & "'!$1:$2"),2,0)

Note, indirect will not work if that external workbook is closed.
 
Upvote 0
Note in particular the triple quotes (a single and a double together). In both instances the single quote is on the right. It's not as obvious on my screen.
 
Upvote 0

Forum statistics

Threads
1,223,952
Messages
6,175,594
Members
452,656
Latest member
earth

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