简体   繁体   English

在另一个工作表中引用单元格,范围不起作用

[英]Reference cell in another sheet with range not working

I am referencing the value of a cell based on another value of other cell in another sheet.我正在根据另一张表中其他单元格的另一个值引用一个单元格的值。 It works for the first row but once I go to the next row it doesn't work as it gets another value not the value I want.它适用于第一行,但是一旦我将 go 移到下一行,它就不起作用了,因为它得到了另一个值,而不是我想要的值。 I feel it has something to do with the referecing using the RC way and the -ve values.我觉得这与使用 RC 方式和 -ve 值的引用有关。 Any advice?有什么建议吗?

=IF(RC[-1]="A";Predefined_data;RC[-1];IF(RC[-1]="B";Predefined_data;R[1]C[-1];IF(RC[-1]="C";Predefined_data!R[2]C[-1]))) =IF(RC[-1]="A";预定义数据;RC[-1];IF(RC[-1]="B";预定义数据;R[1]C[-1];IF(RC[- 1]="C";Predefined_data!R[2]C[-1])))

The problem as soon as I try to lock the references like this:一旦我尝试像这样锁定引用,就会出现问题:

The problem as soon as I try to lock the refeences and make them一旦我尝试锁定参考并制作它们,就会出现问题

=IF(RC[-1]="A";Predefined_data!R[2]C[1];IF(RC[-1]="B";Predefined_data!R[3]C[1];IF(RC[-1]="C";Predefined_data!R[4]C[1])))

It changes back to be using the referencing to the current cell not the fixed one I mentioned and reverts to:它变回使用对当前单元格的引用,而不是我提到的固定单元格,并恢复为:

=IF(RC[-1]="A";Predefined_data!RC[-1];IF(RC[-1]="B";Predefined_data!R[1]C[-1];IF(RC[-1]="C";Predefined_data!R[2]C[-1])))

Any advice?有什么建议吗?

According to the ref: Authoritative Excel range syntax reference根据参考: 权威 Excel 范围语法参考

Just remove the block bracket, replace it with the cell exact location value and the referencing will be absolute.. (functions the same as $ symbol as per comment.)只需删除块括号,将其替换为单元格确切位置值,引用将是绝对的..(功能与注释中的 $ 符号相同。)

So the solution should be: =IF(RC[-1]="A",Predefined_data,R2C1,IF(RC[-1]="B",Predefined_data,R3C1,IF(RC[-1]="C",Predefined_data!R4C1)))所以解决方案应该是: =IF(RC[-1]="A",Predefined_data,R2C1,IF(RC[-1]="B",Predefined_data,R3C1,IF(RC[-1]="C",Predefined_data!R4C1)))

Hope it solves.希望它解决。 (: (:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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