Discussion Locked

Excel sheet linkage using cell contents

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Sheet 1 is labelled "Total", sheet 2 "Jan", sheet 3 "Feb". "Total" sheet has cell contents "Jan" in A1, "Feb" in B1. "Jan" sheet has 100 in A1. "Feb" sheet has 200 in A1. Traditional formula in "Total" sheet cell A2 is =Jan!A1 which returns the value 100, and formula in "Total" sheet cell B2 is =Feb!A1 which returns the value 200. Q: Can I substitute the sheet names (Jan and Feb) in the formulae with the cell contents of A1 and B1 of the "Total" sheet, i.e. formula in "Total" sheet cell A2 something like ="A1"!A1 and cell B2 likewise ="B1"!A1 ? (which incidentally doesn't work of course!). My real data is naturally much more complicated than this, and I want to use a template to replicate to other workbooks that will have varying sheet tab names each time. I don't believe it can be done, so go on... prove me wrong!!

3 replies

by peyison

Try this:

=INDIRECT(A1&"!A1")

If cell A1 has "Jan" - then this resolves into Jan!A1. Indirect returns the actual reference.

You could take it a step further by using:

=INDIRECT(A1&"!"&B1)

Where cell B1 contains the text "A1".

Hopethis helps.

by adh

Hats off to you - that's just the answer I needed (and more)! You deserve all the points for that because it's been driving me daft for days!

This discussion is closed to new replies.