简体   繁体   English

Google表格中带有VLOOKUP的IF条件

[英]IF condition with VLOOKUP in Google Sheets

I want to compare below two sheets (compare all the available cells together on both the sheets) with vlookup.我想用 vlookup 比较下面两张纸(比较两张纸上所有可用的单元格)。 if the one line is available in both the sheets then answer should be "Yes,".如果两张纸上都有一行,那么答案应该是“是”。 if else answer should be "No!".如果其他答案应该是“不!”。

I have below data in sheet1我在 sheet1 中有以下数据

PONo        Code    UID
84914741980 VPP5P   14908660
84914741893 VPP5P   14908653
84914750226 XWKGY   14915367
84914740202 XWKGY   14907478
84914751843 R10KJ   14915997
84914750226 R10KJ   14915366
84914759442 CPC7G   14921768
84914750025 TN78Y   14913781

another sheet2 contains below data,另一个 sheet2 包含以下数据,

PONo        Code    UID
84914741980 VPP5P   14908660
84914741893 VPP5P   14908653
84914750226 XWKGY   14915367
84914750025 TN78Y   14913781
84914750025 TN78Y   14913779
84914743001 TN78Y   14909949
84914740202 TN78Y   14907477
84914740202 TN78Y   14907476
84914741893 YH3T9   14908652

I want the answer to be like below我希望答案如下所示

PONo        Code    UID         Answer
84914741980 VPP5P   14908660    Yes
84914741893 VPP5P   14908653    Yes
84914750226 XWKGY   14915367    Yes
84914740202 XWKGY   14907478    No
84914751843 R10KJ   14915997    No
84914750226 R10KJ   14915366    No
84914759442 CPC7G   14921768    No
84914750025 TN78Y   14913781    Yes

Appreciate forums help to get this done!!感谢论坛帮助完成这项工作!

I tried the below formula, but it works partially.我尝试了以下公式,但它部分有效。

 =if(ARRAYFORMULA(VLOOKUP($A:$C,sheet2!$J:$L,{1,2,3},false))="","No","Yes")

try like this:试试这样:

=ARRAYFORMULA(IF(A2:A<>"", IF(IFERROR(VLOOKUP(A2:A&B2:B&C2:C, 
 Sheet2!E2:E&Sheet2!F2:F&Sheet2!G2:G, 1, 0))<>"", "yes", "no"), ))

在此处输入图像描述

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM