How to update Indirect formula so that cell reference is based on a hardcoded cell value?

k3yn0t3

New Member
Joined
Oct 5, 2023
Messages
42
Office Version
  1. 365
Platform
  1. Windows
Hi all. Quick question:

Does anyone know how to update the formula in I22 to make it be fed by the cell reference i hardcoded into A19? I tried replacing the H60 in the Indirect formula with "text(A19))" but that doesn't work.

The reason I would like to do this is so that I can copy and paste this formula into cells I29:L29 and still have it go to same cell in Factory_2's sheet.

Excel Formula:
=+INDIRECT($C$20&"!"&CELL("ADDRESS",H60))

Thank you in advance.

Best regards,
Sam

Factories_v20.xlsx
ABCDEFGHIJKL
19H60Average Growth Rate
201Factory_1
21Live: Case 1--%--%--%--%
22Case 1--%--%--%--%
23Case 2--%--%--%--%
24Case 3--%--%--%--%
25Case 4--%--%--%--%
26
27H602Factory_2
28Live: Case 1--%--%--%--%
29Case 1--%--%--%--%
30Case 2--%--%--%--%
31Case 3--%--%--%--%
32Case 4--%--%--%--%
Assume_xl2bb
Cell Formulas
RangeFormula
E21,E28E21=+TEXT("Live: "&OFFSET(E21,$E$5,),)
I21:L21,I28:L28I21=+OFFSET(I21,$E$5,)
I22:L22,I29:L29I22=+INDIRECT($C$20&"!"&CELL("ADDRESS",H60))
I23:L25,I30:L32I23=+I22
A27A27=+A19
B27B27=+B20+$E$15
C27C27=+$C$15&$B27
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Hi k3yn0t3,

Isn't it just this:

=+INDIRECT(C20&"!"&A19)

Note - when I copied your example into Excel all the OFFSET formulas were causing circular references which need to be fixed.

Regards,

Robert
 
Upvote 0
Thanks, Robert. Just typing in A19 doesnt work because then it pulls from A19 in the other sheet. The cell that I need to go to when the formula redirects to the other sheet is H60.

The "cell(address())" avoids the #REF in my current formula. I have 200 factories so I need this to be dynamic, or else I'd manually copy and paste
 
Upvote 0
If H60 is in cell A19 it will reference cell H60 :confused:
 
Upvote 1
It's working perfectly in my current workbook, apologies if something is lost in translation. Of course, indirect makes auditing a pain
 
Upvote 0
So all good now? Did you fix the circular references?
 
Upvote 1
Sorry no. I meant that the original formula isn't REFing out for me. I want to copy and paste the I22 formula into I29 and have the H60 reference not change. Right now, it changes to H67. I understand why it changes, but I'm trying to find a workaround so that I can duplicate these driver rows and have the formula still work to avoid copy and pasting this formula with H60 for each factory 200 times :)
 
Upvote 0
Figured this out! I anchored the reference so that the row doesn't move as I copy it down...so obvious. Thanks for the help, Robert

Before:
Excel Formula:
=+INDIRECT($C20&"!"&CELL("ADDRESS",H60))

After
Excel Formula:
=+INDIRECT($C20&"!"&CELL("ADDRESS",H$60))
 
Upvote 0
Solution
Figured this out!

Great (y) Just remember to fix the circular references as these can cause the calculation engine to freeze and then no formulas will calculate.
 
Upvote 1

Forum statistics

Threads
1,215,106
Messages
6,123,124
Members
449,097
Latest member
mlckr

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