Unable to Drag/Copy formula which contains reference to Sheet I.D.

utuber

New Member
Joined
Oct 19, 2009
Messages
34
Hi all, I have a cell H306 with the following formula ='9002858'!$B$2 The '9002858' part refers to a Sheet number which I currently have to manually enter as the Sheet reference does not change when I Drag/copy into new rows . The Sheet Number 9002858, can be obtained from Cell B306 but I haven't been able to have the formula in Cell H306 reference that Number correctly when I just drag/copy the cell down as with other cells in the Row. The Sheet Number stays the same as the Cells I drag down from. Hope this makes sense and thank you in advance for any solutions.
Regards utuber
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Is this what you are looking for?
VBA Code:
=INDIRECT("'" & B306 & "'!$B$2")
 
Upvote 0
Solution
Is this what you are looking for?
VBA Code:
=INDIRECT("'" & B306 & "'!$B$2")
That is Exactly what I wanted... thank you very much Joe4. I have not had experience with INDIRECT in the past so will have to check it out.
Thank you
 
Upvote 0
You are welcome.

Yes, if you would like to build range references dynamically in an Excel formula, you need to use INDIRECT.
 
Upvote 0

Forum statistics

Threads
1,213,489
Messages
6,113,953
Members
448,535
Latest member
alrossman

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