user1542743
user1542743

Reputation: 105

Excel formula - fixing cell reference across multiple worksheets

This is a question for Excel. I have to create similar tables in several worksheets. But the tables are not matched up in terms of the row numbers. For example, table in worksheet one starts on row 48; table in worksheet two starts on row 35, etc. Each table refers to a cell that is 3 rows above the table starts and needs to be fixed for the length of the table. So, in table in worksheet one, the formula needs to refer to cell M45 (three rows above 48); in table in worksheet two, the formula needs to refer to cell M32 (three rows above 35); and so on. If it were just one worksheet, I know that I could fix 32 and refer to M$45. But I do not know how to automate it for the problem described above. The formula I need to automate is:

IF(SUM($L49:$L$61)>=M$45,0,MIN($L48,M$45)).

M$45 needs to be M$32 in worksheet two when I copy the formula over from worksheet one to worksheet two. The other references will also need to be modified accordingly. But once I know how to do one, I can take care of the rest. Would appreciate any help you can provide.

Upvotes: 0

Views: 476

Answers (1)

user4039065
user4039065

Reputation:

If you use the following inside the table,

=OFFSET([#Headers], -3, 0, 1, 1)

The formula will adjust to show the table name as in,

=OFFSET(Table1[#Headers], -3, 0, 1, 1)

Copying the table will adjust the internal formula to the new table's name. e.g.

=OFFSET(Table2[#Headers], -3, 0, 1, 1)

Upvotes: 1

Related Questions