简体   繁体   English

Google工作表如果工作表1中的X =工作表2中的Y,则在工作表1中显示工作表2中的Z

[英]Google Sheets If X in Sheet 1 = Y in sheet 2, display Z from sheet 2 on sheet 1

I have a Google sheet, and in that sheet I have multiple inner sheets, I have 'overview' which is an overview sheet which lists various key points of all the inner sheets so that you can see at a glance the information you are after without having to go digging into the inner sheets which has all the detailed information, think of overview as a sheet for a supervisor so they can see all the key information without the need of digging into the sheets. 我有一个Google工作表,在该工作表中有多个内部工作表,我有一个“概述”,这是一个概述工作表,其中列出了所有内部工作表的各个关键点,以便您一眼就能看到需要的信息不得不深入研究包含所有详细信息的内部工作表,将概述视为主管的工作表,这样他们就可以查看所有关键信息,而无需深入研究工作表。

I have another sheet called 'courses' and in there we have a list of courses along with who is in charge of the course and the details related to each course. 我还有一张名为“课程”的表格,其中有课程列表,以及负责课程的人以及与每门课程相关的详细信息。

What I am needing is for the overview sheet to have something like IF X exists on both overview column 1 and courses column 1 display the value of courses row M on the matched course in overview column 2 at the side of the relevant course. 我需要的是概览表在概览列1上都存在IF X之类的内容,而课程列1在相关课程侧面的概览列2的匹配课程中显示课程行M的值。

I also an issue that in overview the courses are arranged alphabetically however on courses they are arranged based on pupils so the courses in sheet 1 and 2 are not in the same order, the list is also constantly expanding as more courses become available so if its at all possible if a course does not have have a tutor I would prefer to leave it blank rather than an error like #ref, I'm not sure how I get a function to factor this in. 我还有一个问题,就是总的来说,课程是按字母顺序排列的,但是在课程上是根据学生排列的,因此工作表1和2中的课程并不相同,随着更多课程的推出,清单也在不断扩大,因此如果一门课程没有导师,我会尽可能将其留空,而不是像#ref这样的错误,我不确定如何获得将其纳入其中的函数。

I have tired the following with no luck; 我没有运气就累了下面的人。

=INDEX('Courses'!M:M, MATCH(A:A,'Courses'!A:A, 0))

EDIT 编辑

Heres some examples; 这里有一些例子;

| Courses | Tutor |
|---------|-------|
| A       | ?     |
| B       | ?     |
| C       | ?     |
| D       | ?     |

A course Sheet 课程表

| Courses | Tutor | Pupils | Start Date | End Data |
|---------|-------|--------|------------|----------|
| A       | Mr X  | 10     | x          | x        |
| D       | Ms Y  | 7      | x          | x        |
| C       | Ms Y  | 5      | x          | x        |
| B       | Ms Y  | 2      | x          | x        |

Thanks for any and all help. 感谢您提供的所有帮助。

You were almost there! 你快到了! Use the formula you listed, but instead of A:A in the first argument of the Match formula, this should point to only one single value, like this: 使用您列出的公式,而不是Match公式的第一个参数中的A:A,它应仅指向一个单一值,如下所示:

=INDEX('Courses'!M:M, MATCH(A1,'Courses'!A:A, 0))

Here's the documentation for MATCH: https://support.google.com/docs/answer/3093378?hl=en 以下是MATCH的文档: https : //support.google.com/docs/answer/3093378?hl=zh_CN

If you are concerned about blank returning an error, you can wrap that whole thing if an iferror formula, like this: 如果您担心空白返回错误,则可以将整个内容包装为iferror公式,如下所示:

=IFERROR(INDEX('Courses'!M:M, MATCH(A1,'Courses'!A:A, 0)),"No match")

可以使用ArrayFormula实现:

=arrayformula(iferror(vlookup(A1:A,Courses!A:M,13,0),""))

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

相关问题 如果工作表 1 中的单元格 A1 等于工作表 2 中的“x”,则在工作表 1 单元格 C2 中显示工作表 2 中的单元格 B1 - If cell A1 in sheet 1 equals 'x' like in sheet 2, then display cell B1 from sheet 2 in sheet 1 cell C2 Sheet.Range(Sheet,Cells(x,y), Sheet.Cells(x2,y2)) 语法 - Sheet.Range(Sheet,Cells(x,y), Sheet.Cells(x2,y2)) Syntax 如果工作表“ X”中的单元格包含工作表“ y”的名称,请删除行工作表“ x” - Delete row sheet 'x' if cell in sheet 'X' contains name of sheet 'y' 将列宽从工作簿 x 表 i 复制到工作簿 y 表 i - Copy columnwidth from workbook x sheet i to workbook y sheet i 比较两张 excel 工作表,以了解来自工作表 1 的工作表 2 中的缺失数据和新数据 - Compare two excel sheets for missing and new data in Sheet 2 from Sheet 1 Google 表格使用当前工作表中计算的动态值引用另一工作表中的值 - Google Sheets referencing values from another sheet using dynamic value calculated in current sheet Google 工作表脚本将数据集从一张工作表复制到另一张工作表的顶部(仅限值) - Google sheets script copy data sets from one sheet to another (values only) at the top of the sheet 图纸代码中的图纸名称 - Sheet name from Sheet Code 有条件从工作表1复制到工作表2 - Copy from sheet 1 to sheet 2 with condition 将数据从工作表1移动到工作表2 - Moving data from sheet 1 to sheet 2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM