Changing the sheet a formula is refering to.

Sal_P

New Member
Joined
Feb 15, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I made a sheet (Sheet 2) where a lot of the formulas are referencing data from another sheet (Sheet 1). Is there a way to write the formulas so I can change the sheet they're referencing by changing a single cell? I want all my formulas to reference data Sheet 3 instead of Sheet 1 by changing a cell, can this be done?

I hope I explained myself,

Thank you!
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
if you setup the formula to use indirect() so the sheet is obtained from a cell , may work

do you have a sample sheet you can load here using XL2BB ?
or put on a share like onedrive/dropbox

heres an example - BUT not the range is in "" , so it get a lot more complicated if you want the range to change as you copy/paste the formula

this is a countif formula
and if you change C1 to sheet2 or any other name , then it will use that sheet name

Book6
ABCDE
14Fredsheet1John
2fred
3John
4fred
5fred
6John
7fred
Sheet1
Cell Formulas
RangeFormula
A1A1=COUNTIF(INDIRECT("'"&C1&"'!$E$1:$E$8"),B1)
 
Upvote 0

Forum statistics

Threads
1,214,999
Messages
6,122,645
Members
449,093
Latest member
Ahmad123098

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