Excel Indirect function ; refer to call rather than "hard code" reference

dicken

Active Member
Joined
Feb 12, 2022
Messages
283
Office Version
  1. 365
Platform
  1. Windows
Hi,

In the following formula I have type in the "A2:A6";

Excel Formula:
SUMIF(INDIRECT("'"&Sheets&"'!"&"A2:A6"),"a",INDIRECT("'"&Sheets&"'!"&"B2:B6"))

Sheet = named range

is there a way to have the reference to A2 to A6 in other cells so a cell A1 = "A1", A2 = "A6" and then just select those two cells, I've tried this and it does
not seem to work, I've also entered all the values as a range a1, a2, a3, a4, a5, a6, I also tried to the indirect just for the sheet
INDIRECT( Sheet&"!") & Range , but this did not work either?
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Have you tried this?

Excel Formula:
INDIRECT("'"&Sheets&"'!"&A1&":"&A2)
 
Upvote 0

Forum statistics

Threads
1,215,097
Messages
6,123,076
Members
449,094
Latest member
mystic19

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