Google电子表格根据其他人的价值查找单元格 [英] Google spreadsheet look up cell based on value of other

查看:117
本文介绍了Google电子表格根据其他人的价值查找单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试使用此电子表格,并且我将参考它。

我试图让单元格X4显示列A中的数据,相对于单元格X3中显示的列B的最大值,即在写入时最大值被列为27,这是由Purelycraft完成的,所以我希望它使用公式自动显示Purelycraft这个名字,因为他杀死的最多。

解决方案

  = OFFSET -1,0)

分解:


  • 使用 OFFSET

      OFFSET(code> )来选择一个位置可以相对于另一个参考单元格表示的单元格。 cell_reference,offset_rows,offset_columns)

    cell_reference :电子表格中的名称位于列A中,所以我们将使用列(A1)中的第一个单元格作为我们的锚点。为了确保在复制公式时引用不会发生更改,我们将使用绝对引用($ A $ 1)。 (阅读更多



    offset_rows :我们将计算从 A1 它是包含最大值的行。

    offset_columns :名称全部在一列中,所以 0 是一个合适的值。

  • 使用 MATCH 找到目标行。

    <$ p $ MATCH(search_key,range,search_type)

    search_key :这是我们要查找的值。您已经有 MAX($ B $ 3:$ B $ 22),所以我们会继续使用它。

    范围:这是我们要看的地方。我们将返回到B列,但您会注意到我们正在使用从第1行开始的整个列。我们可以使用与 MAX ,但如果检查 MATCH 的文档,则会看到它返回与某个指定值匹配的范围内项目的相对位置。从第一行开始,如果我们只减去1,我们就与 OFFSET 中的引用单元格A1保持一致。



    search_type :类型0找到完全匹配。


The spreadsheet we are trying to use this on and I will be referencing.

I am trying to get cell X4 to display the data from column A relative to the max of column B as displayed in cell X3, ie at the time of writing this the maximum is listed as 27, which was done by "Purelycraft" and so I want it to use formulas to automatically display the name "Purelycraft" as he has the most kills.

解决方案

=OFFSET($A$1,MATCH(MAX($B$3:$B$22),$B$1:$B$22,0)-1,0)

Breaking it down:

  • Use OFFSET to select a cell whose location can be expressed relative to another reference cell.

    OFFSET(cell_reference, offset_rows, offset_columns)
    

    cell_reference: The names in your spreadsheet are in Column A, so we'll use the first cell in the column (A1) as our anchor. To make sure that the reference doesn't get changed if the formula is copied, we'll use an absolute reference ($A$1). (Read more here.)

    offset_rows: We'll calculate how many rows down from A1 it is to the row that contains the maximum value. More on that later.

    offset_columns: The names are all in one column, so 0 is an appropriate value here.

  • Use MATCH to find the target row.

    MATCH(search_key, range, search_type)
    

    search_key: This is the value we're looking for. You already had MAX($B$3:$B$22), so we'll keep using that.

    range: This is where we'll look. We'll return to column B for this, but you'll note that we're using the entire column starting at row 1. We could have used the same range that we used for MAX, but if you check the docs for MATCH you'll see that it returns the "relative position of an item in a range that matches a specified value." By starting at row 1, we align with our reference cell A1 in OFFSET, if we just subtract 1.

    search_type: Type 0 finds an exact match.

这篇关于Google电子表格根据其他人的价值查找单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆