Problem with Indirect function to make more dynamic

WednesdayC

Board Regular
Joined
Nov 7, 2010
Messages
201
Office Version
  1. 2016
Platform
  1. MacOS
Hi Team

Please can someone help me as I have trying for ages to sort this out.

I am trying to reference other worksheets

The simple formula I have is:-
=INDIRECT(L2&"!A1")

However, I want to replace the hard coded 2 from L2 to the columns function i.e. in this case Columns($A:B) as I have a list of worksheets I am trying to reference (in column L). I can't find a way to do this.

Any help would be much appreciated.

Regards
Wednesday
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hi WednesdayC,

I'm struggling to understand what you are trying to do.

I have Sheet2 through Sheet6 with
Excel Formula:
="This is Sheet number "&SHEET()
in A1 of each sheet.
I have listed sheet names in L2 through L7 which works, with the expected #REF as there's no Sheet7.

Can you give an example of what you want the results to look like?

WednesdayC.xlsx
IJKL
1Retrieved from A1List
2This is Sheet number 2Sheet2
3This is Sheet number 3Sheet3
4This is Sheet number 4Sheet4
5This is Sheet number 5Sheet5
6This is Sheet number 6Sheet6
7#REF!Sheet7
Sheet1
Cell Formulas
RangeFormula
I2:I7I2=INDIRECT(L2&"!A1")
 
Upvote 0
HI Toadstool
Thank you for getting back to me.
I am trying to copy the formula across, so that in one column I have =INDIRECT(L2&"!A1") and then the next column becomes INDIRECT(L3&"!A1) etc.
This isn't the actual formula, I need (I am trying to do an Xlookup across several worksheets, but if I can get this working then I should be able to figure out the rest)

So basically, I need L2, L3, L4 as part of the formula, as the worksheet names are all in a vertical list.

I hope this makes sense.

Regards

Wednesday
 
Upvote 0
Hi Toadstool

Yes!!!!

Thank you so much. I couldn't figure this out at all.

Regards Wednesday
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,252
Members
449,075
Latest member
staticfluids

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