Dynamic cell reference within INDIRECT

itsrich

Board Regular
Joined
Apr 13, 2009
Messages
73
Office Version
  1. 365
Platform
  1. Windows
I am using this INDIRECT("'"&$A4&"'!"&"$G2:$G300") & INDIRECT("'"&$A4&"'!"&"$G2:$G300") in a formula.

I want the 300 in the range reference to be the value in cell T4. T4 =297

The whole formula (manually changed from above) =IF(COUNTIFS(INDIRECT("'"&$A4&"'!"&"$G2:$G297"),C2,INDIRECT("'"&$A4&"'!"&"$F2:$F297"),C3)=0,"",COUNTIFS(INDIRECT("'"&$A4&"'!"&"$G2:$G297"),C2,INDIRECT("'"&$A4&"'!"&"$F2:$F297"),C3))

One of my goals is to avoid manually changing formulas to replace the actual range on all the sheets within this workbook.

Another goal is to make the range change used in each formula based on the number in column T as I copy the formula down.

I sometimes feel like it is a curse when I am creating such large & involved spreadsheets.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
How about
Excel Formula:
INDIRECT("'"&$A4&"'!"&"$G2:$G"&T4)
 
Upvote 0
Solution
I so love this board! TYSVM Fluff.

I work in a place where I am the most knowledgeable Excel person. I know of no other local source for this sort of conversation or knowledge.

Thank You Fluff for opening the door to the next Pandora's Box of Excel knowledge! ;)
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

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