[英]Expand RegexMatch To Test Against An Entire Range Of Cells - Google Sheets
In Google Sheets, I'm trying to essentially make an address book which I then want to use as a means of working out who is associated with each row in my data spreadsheet.在 Google Sheets 中,我试图基本上制作一个地址簿,然后我想用它作为一种方法来确定谁与我的数据电子表格中的每一行相关联。
From looking around, I seemed to find that the best way to do the actual search would be to use the following formula环顾四周,我似乎发现进行实际搜索的最佳方法是使用以下公式
=ARRAYFORMULA(IF(REGEXMATCH($C$2:C, 'Address Book'!$A$2:A), 'Address Book'!$A$2:B ))
So my interpretation of this formula was that it is saying that for each row of column C, if it contains ANY of the values that are in Column A of the address book sheet, then show column A AND column B from the relevant row of the address book sheet.所以我对这个公式的解释是,对于 C 列的每一行,如果它包含地址簿表 A 列中的任何值,那么从相关行中显示 A 列和 B 列地址簿表。
However, I think the issue is actually that it is only looking at one row of the address book sheet as the formula only works if both the address book record and the data record use the same row number on their respective sheets.但是,我认为问题实际上是它只查看地址簿表的一行,因为该公式仅在地址簿记录和数据记录在其各自的表上使用相同的行号时才有效。 How can I expand this formula to make sure that it checks all of the values in column A of the address book sheet?
如何扩展此公式以确保它检查地址簿表 A 列中的所有值?
EDIT: I realise I hadn't been clear on how the cells actually work.编辑:我意识到我还不清楚细胞的实际工作方式。 So for example, in column C of my data sheet, each cell would look something like the following:
例如,在我的数据表的 C 列中,每个单元格将如下所示:
My Video Title - Joe Bloggs - ACME Co
And then in column A & B of my address book sheet, I then just have the names and emails listed which I then want to check against the above然后在我的地址簿表的 A 和 B 列中,我只列出了姓名和电子邮件,然后我想对照上述内容进行检查
Joe Bloggs joebloggs@
Jon Smith jonsmith@
So then I basically want to check if Joe Bloggs or Jon Smith or any other name in the address book sheet is in each row of Column C of my data sheet and if it is then get Column A AND B of the relevant row from the address book sheet那么我基本上想检查地址簿表中的 Joe Bloggs 或 Jon Smith 或任何其他名称是否在我的数据表的 C 列的每一行中,然后从地址中获取相关行的 A 列和 B 列书单
在第 2 行尝试:
=INDEX(IFNA(VLOOKUP(C2:C, Address Book'!A2:B, 2, 0)))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.