简体   繁体   中英

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.

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. eg

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM