Formula Help - Replace Sheet Name with dynamic cell reference

benposaner

New Member
Joined
Jan 7, 2021
Messages
9
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi All

I'm sure it's a really simple and obvious solution, but I've tried a few obvious (to me) ideas, but keep on getting errors.

I've got the following formula and it works fine.
=IFERROR(OFFSET('Data Sheet 1'!$A$1,XMATCH($A4,'Data Sheet 1'!$A$2:$A$4),XMATCH(B$3,'Data Sheet 1'!$C$1:$F$1)+1),"No Data Available")

But I want it to be dynamic and replace the 'Data Sheet 1' parts with a cell reference, which will contain the sheet name.

Any help would be much appreciated.

Thanks
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
You need an INDIRECT
 
Upvote 0
How about like
Excel Formula:
=IFERROR(OFFSET(INDIRECT("'"&A1&"'!$A$1"),XMATCH($A4,INDIRECT("'"&A1&"'!$A$2:$A$4")),XMATCH(B$3,INDIRECT("'"&A1&"'!$C$1:$F$1"))+1),"No Data Available")
 
Upvote 0
Solution
You need an INDIRECT
I did try that, but could not figure how it should be coded, with the ! etc.

This gives me errors :(
=IFERROR(OFFSET(INDIRECT(A1)&!$A$1,XMATCH(........

I'm sure I need some kind of '' and &s, but I can't figure it out!

<UPDATE> Just saw the above. Thanks. :)
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,029
Messages
6,122,755
Members
449,094
Latest member
dsharae57

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