在Excel 2007中执行双单元格引用

时间:2021-06-19 19:26:12

I am writing a sheet to display a specific students' results on a test. In a seperate sheet I have all the results of all the students and want to make some graphics for just this one student, which is given by his row number in the matrix of results.

我正在写一张表格,以显示特定学生的考试成绩。在一张单独的表格中,我得到了所有学生的所有结果,并希望为这一个学生制作一些图形,这是由他在结果矩阵中的行号给出的。

To get this done, I need to do a reference inside a reference, and I dont know how to do that. A typical script in a cell will be:

为了完成这个,我需要在引用中做一个引用,我不知道该怎么做。单元格中的典型脚本将是:

=IF('All results'!G3>=E3*'All results'!G2;3;IF('All results'!G3>=E4*'All results'!G2;2;1))

Here, I need the '3' after G to be extracted from an other cell (given in B5 in the current sheet).

在这里,我需要从其他单元格中提取G之后的'3'(在当前表格中的B5中给出)。

How can I place a reference inside a reference?

如何在引用中放置引用?

1 个解决方案

#1


4  

It is not completely clear what you are wanting.

目前还不完全清楚你想要什么。

I think you want a way to build the reference 'All results'!G3, where the 3 is a variable and its value is located in cell B5. To do that, you can use the ADDRESS function:

我想你想要一种方法来建立参考'所有结果'!G3,其中3是一个变量,它的值位于单元格B5中。为此,您可以使用ADDRESS功能:

=ADDRESS(B5,7,,,"All Results")

The '7' in the formula specifies the 7th column, which is 'G'.

公式中的'7'指定第7列,即'G'。

You would then use the INDIRECT function to retrieve the value in the cell that was returned by the ADDRESS function.

然后,您将使用INDIRECT函数检索ADDRESS函数返回的单元格中的值。

#1


4  

It is not completely clear what you are wanting.

目前还不完全清楚你想要什么。

I think you want a way to build the reference 'All results'!G3, where the 3 is a variable and its value is located in cell B5. To do that, you can use the ADDRESS function:

我想你想要一种方法来建立参考'所有结果'!G3,其中3是一个变量,它的值位于单元格B5中。为此,您可以使用ADDRESS功能:

=ADDRESS(B5,7,,,"All Results")

The '7' in the formula specifies the 7th column, which is 'G'.

公式中的'7'指定第7列,即'G'。

You would then use the INDIRECT function to retrieve the value in the cell that was returned by the ADDRESS function.

然后,您将使用INDIRECT函数检索ADDRESS函数返回的单元格中的值。