简体   繁体   English

Excel IF、VLOOKUP、THEN 公式跨多列

[英]Excel IF, VLOOKUP, THEN formula across multiple columns

I have 4 columns that I need to compare to produce an output into a 5th column exampled below:我需要比较 4 列,以便将 output 生成到下面示例的第 5 列中:

  • IF col1 = "Partner Opportunity" THEN IF col1 = "合作伙伴机会" THEN
  • AND IF col2 <> "CLM Driven Lead" THEN AND IF col2 <> "CLM Driven Lead" THEN
  • VLOOKUP(col3,col4:col4,1,FALSE) VLOOKUP(col3,col4:col4,1,FALSE)
  • RETURN IF MATCH "CLM Driven Lead" ELSE RETURN ""返回 IF MATCH "CLM Driven Lead" ELSE RETURN ""
col1 col1 col2 col2 col3 col3 col4 col4 col5 col5
Partner Opportunity合作伙伴机会 CLM Driven Lead CLM 驱动的潜在客户 Pete皮特 Frank坦率
Partner Opportunity合作伙伴机会 Mary玛丽 David大卫 CLM Driven Lead CLM 驱动的潜在客户
Frank坦率 Mary玛丽

So far I have tried a combination of different IFs, ORs, ANDs, VLOOKUPs etc. Below are the one's I feel I came the closest to what I am trying to achieve:到目前为止,我已经尝试了不同 IF、OR、AND、VLOOKUP 等的组合。以下是我认为最接近我想要实现的目标:

=IF(AY2="Partner Opportunity",IF(VLOOKUP(D2,BH:BH,1)=D2,"Update Lead Source to CLM Driven Lead",""),"")
=IF(AND(AY229="Partner Opportunity",R229<>"CLM Driven Lead"),IF(OR(ISNUMBER(MATCH(B229,BH:BH,0)))),"Change Lead Source to CLM Driven Lead","NO")

Any help is appreciated!任何帮助表示赞赏!

Standard IF(AND())标准 IF(AND())

=IF(AND(A2="Partner Opportunity",B2<>"CLM Driven Lead",ISNUMBER(MATCH(C2,D:D,0)))," CLM Driven Lead","")

MATCH will return a number if the match exists and an error if not.如果匹配存在,MATCH 将返回一个数字,否则返回错误。 The ISNUMBER returns TRUE/FALSE. ISNUMBER 返回 TRUE/FALSE。

在此处输入图像描述

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

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