Another Daft Excel Question

Author
Discussion

nikaiyo2

Original Poster:

4,976 posts

201 months

Wednesday 23rd November 2022
quotequote all
I have an excel workbook that has various worksheets within it.
There is a summary page that copies values from cells within the various sheets.
All simple and works just fine.

However when I insert a column in the individual sheets, it alters the link in the summary sheet. So for instance the summary links to Cell $F$157 when I insert a column this automatically changes to $G$157.

Is there a way to stop this, I want it to continue to point to $F$157, even after having inserted a new column.

Doofus

27,920 posts

179 months

Wednesday 23rd November 2022
quotequote all
You'll need to use Relative (R1C1) cell references.


Mr Pointy

11,692 posts

165 months

Wednesday 23rd November 2022
quotequote all

i4got

5,732 posts

84 months

Wednesday 23rd November 2022
quotequote all
You may need Indirect() function

eg

To bring in the value in cell H4 from Sheet2 even if you insert columns before column H then it would look like this.

=INDIRECT("Sheet2"&"!"&"H4")

Basically you build up a string referencing the sheet name and the cells.




Planet Claire

3,344 posts

215 months

Wednesday 23rd November 2022
quotequote all
If it was just a single cell then you could name the cell, for example, Fred, then in your summary sheet just put "=Fred" and it will pull through whatever value cell "Fred" has. It doesn't matter if you insert extra columns or rows, Excel will automatically update the reference cell for Fred.

Edit, didn't read your question properly, in particular the last sentence, so my way wouldn't work for what you want to do, so forget it!

Edited by Planet Claire on Thursday 24th November 07:09

Jenny Tailor

1,727 posts

43 months

Wednesday 23rd November 2022
quotequote all
=INDIRECT is your friend - as mentioned above.
He nailed it. smile