ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   freeze cell reference when inserting a row (https://www.excelbanter.com/excel-discussion-misc-queries/107355-freeze-cell-reference-when-inserting-row.html)

Rod

freeze cell reference when inserting a row
 
I have two worsheets A & B. I have linked cell D4 in A to D2 in B. When I
insert a row into B, I would like cell D4 in A to always display the
contents of D2 regardless of the number of rows i insert at that point. Can
anyone help me?

Bernie Deitrick

freeze cell reference when inserting a row
 
Rod,

=INDIRECT("'Sheet B'!D2")

Fix up the sheet name to reflect your actual names...

HTH,
Bernie
MS Excel MVP


"Rod" wrote in message
...
I have two worsheets A & B. I have linked cell D4 in A to D2 in B. When I
insert a row into B, I would like cell D4 in A to always display the
contents of D2 regardless of the number of rows i insert at that point. Can
anyone help me?




Rod

freeze cell reference when inserting a row
 

Bernie,

Thanks for the help. It is quite working out for me though. I put in the
formula like you said ,but it returns "#ref" instead of what I want it to?
The other worksheet was open at the time so that shouldn't be the issue.
What do they mean by A1 reference, or R1C1? Does that have anything to do
with my problem?

Thanks in advance for you help.

Rod
"Bernie Deitrick" wrote:

Rod,

=INDIRECT("'Sheet B'!D2")

Fix up the sheet name to reflect your actual names...

HTH,
Bernie
MS Excel MVP


"Rod" wrote in message
...
I have two worsheets A & B. I have linked cell D4 in A to D2 in B. When I
insert a row into B, I would like cell D4 in A to always display the
contents of D2 regardless of the number of rows i insert at that point. Can
anyone help me?





Bernie Deitrick

freeze cell reference when inserting a row
 
Rod,

Worksheets are tabs within a workbook. Separate files are called workbooks, not worksheets... thus
our confusion.

You need to create a valid formula string within the INDIRECT function that refers to the cell of
interest. Open both books, type = into cell D4 of book A, then navigate to cell D2 of book B and
press Enter. You should then get a formula like

='[BookB.xls]Sheet 1'!$D$2

Which you can then include in the INDIRECT function by adding

INDIRECT("

between the = and the first ' (or, if there is no single quote mark, the square bracket [ ) and
then adding

")

at the end.


HTH,
Bernie
MS Excel MVP


"Rod" wrote in message
...

Bernie,

Thanks for the help. It is quite working out for me though. I put in the
formula like you said ,but it returns "#ref" instead of what I want it to?
The other worksheet was open at the time so that shouldn't be the issue.
What do they mean by A1 reference, or R1C1? Does that have anything to do
with my problem?

Thanks in advance for you help.

Rod
"Bernie Deitrick" wrote:

Rod,

=INDIRECT("'Sheet B'!D2")

Fix up the sheet name to reflect your actual names...

HTH,
Bernie
MS Excel MVP


"Rod" wrote in message
...
I have two worsheets A & B. I have linked cell D4 in A to D2 in B. When I
insert a row into B, I would like cell D4 in A to always display the
contents of D2 regardless of the number of rows i insert at that point. Can
anyone help me?







Rod

freeze cell reference when inserting a row
 
I have been trying it both in separate worksheets and workbooks to see which
one would work out the best. I will try your suggestion and let you know the
results

"Bernie Deitrick" wrote:

Rod,

Worksheets are tabs within a workbook. Separate files are called workbooks, not worksheets... thus
our confusion.

You need to create a valid formula string within the INDIRECT function that refers to the cell of
interest. Open both books, type = into cell D4 of book A, then navigate to cell D2 of book B and
press Enter. You should then get a formula like

='[BookB.xls]Sheet 1'!$D$2

Which you can then include in the INDIRECT function by adding

INDIRECT("

between the = and the first ' (or, if there is no single quote mark, the square bracket [ ) and
then adding

")

at the end.


HTH,
Bernie
MS Excel MVP


"Rod" wrote in message
...

Bernie,

Thanks for the help. It is quite working out for me though. I put in the
formula like you said ,but it returns "#ref" instead of what I want it to?
The other worksheet was open at the time so that shouldn't be the issue.
What do they mean by A1 reference, or R1C1? Does that have anything to do
with my problem?

Thanks in advance for you help.

Rod
"Bernie Deitrick" wrote:

Rod,

=INDIRECT("'Sheet B'!D2")

Fix up the sheet name to reflect your actual names...

HTH,
Bernie
MS Excel MVP


"Rod" wrote in message
...
I have two worsheets A & B. I have linked cell D4 in A to D2 in B. When I
insert a row into B, I would like cell D4 in A to always display the
contents of D2 regardless of the number of rows i insert at that point. Can
anyone help me?







Rod

freeze cell reference when inserting a row
 
Thank you so much Bernie. It was the quotation marks I was lacking. What is
their purpose? What does that say to the computer?

"Rod" wrote:


Bernie,

Thanks for the help. It is quite working out for me though. I put in the
formula like you said ,but it returns "#ref" instead of what I want it to?
The other worksheet was open at the time so that shouldn't be the issue.
What do they mean by A1 reference, or R1C1? Does that have anything to do
with my problem?

Thanks in advance for you help.

Rod
"Bernie Deitrick" wrote:

Rod,

=INDIRECT("'Sheet B'!D2")

Fix up the sheet name to reflect your actual names...

HTH,
Bernie
MS Excel MVP


"Rod" wrote in message
...
I have two worsheets A & B. I have linked cell D4 in A to D2 in B. When I
insert a row into B, I would like cell D4 in A to always display the
contents of D2 regardless of the number of rows i insert at that point. Can
anyone help me?





Bernie Deitrick

freeze cell reference when inserting a row
 
The quote marks tell Excel that the value being passed to the function is a string, which is what
the INDIRECT function requires.

HTH,
Bernie
MS Excel MVP


"Rod" wrote in message
...
Thank you so much Bernie. It was the quotation marks I was lacking. What is
their purpose? What does that say to the computer?

"Rod" wrote:


Bernie,

Thanks for the help. It is quite working out for me though. I put in the
formula like you said ,but it returns "#ref" instead of what I want it to?
The other worksheet was open at the time so that shouldn't be the issue.
What do they mean by A1 reference, or R1C1? Does that have anything to do
with my problem?

Thanks in advance for you help.

Rod
"Bernie Deitrick" wrote:

Rod,

=INDIRECT("'Sheet B'!D2")

Fix up the sheet name to reflect your actual names...

HTH,
Bernie
MS Excel MVP


"Rod" wrote in message
...
I have two worsheets A & B. I have linked cell D4 in A to D2 in B. When I
insert a row into B, I would like cell D4 in A to always display the
contents of D2 regardless of the number of rows i insert at that point. Can
anyone help me?







All times are GMT +1. The time now is 08:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com