Indirect Formula

djw1998

New Member
Joined
May 25, 2022
Messages
21
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am using the following formula and trying to drag horizontally without just copying the reference to the current cell. I am not very familiar with the indirect formula but this could help save me hours worth of manual linking..

=INDIRECT("'"&B2&"'!c37")

B2 is the tab name and C37 is the cell. I would like to drag horizontally across columns and auto-populate.

Thanks!
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
do you want as you drag across columns for the formula to change
from
=INDIRECT("'"&B2&"'!c37")
to
=INDIRECT("'"&B2&"'!D37")
=INDIRECT("'"&B2&"'!E37")

if so then you need to use a COLUMN() function with the Address() function

what column is
=INDIRECT("'"&B2&"'!c37")
IN
then you can use
COLUMN()+??? depending on where it starts

assuming the formula start in column B
=INDIRECT("'"&$B$2&"'!"&ADDRESS(37,COLUMN()+1))

SO as the formula is in columnB and you want columnC

,COLUMN()+1 willl return C
as you move across the column will change and with the plus 1 - D,E,F etc


Book6
ABCDE
1
2Sheet1
3
4fredJohnHarry
36
37fredJohnHarry
38
Sheet1
Cell Formulas
RangeFormula
B4:D4B4=INDIRECT("'"&$B$2&"'!"&ADDRESS(37,COLUMN()+1))
 
Upvote 0
THIS IS GREAT!

One question, what if my formula is in column "I" instead of column B?
 
Upvote 0
then I is the 9th column
and C is the 3rd column
so you need to setup for C
it would be column() - which will return a 9 when its in I
-6 will bring it back to 3 , which is C

=INDIRECT("'"&$B$2&"'!"&ADDRESS(37,COLUMN()-6))

so as you copy across -
9-6 = 3 C
10-6 = 4 D
11-6 =5 E

Book6
ABCDEFGHIJKL
1
2Sheet1
3
4fredJohnHarryfredJohnHarry
36
37fredJohnHarry
38
Sheet1
Cell Formulas
RangeFormula
B4:D4B4=INDIRECT("'"&$B$2&"'!"&ADDRESS(37,COLUMN()+1))
I4:K4I4=INDIRECT("'"&$B$2&"'!"&ADDRESS(37,COLUMN()-6))



if you just put column() into a cell - see ROW 40
you can see what column you get
A=1 etc

hope that helps explain

you can do the same with ROW()
so row 37 can be changed using the same technique
 
Upvote 0
Solution

Forum statistics

Threads
1,223,887
Messages
6,175,199
Members
452,617
Latest member
Narendra Babu D

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