[英]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.