简体   繁体   English

Excel查找具有多个条件的多个值

[英]Excel lookup multiple values with multiple conditions

I have two tables that I need to compare return a true or false value, the challenge is the user ID appears multiple times in both tables which means my VLOOKUP gets stuck at the first value. 我有两个需要比较的表,返回一个真值或假值,挑战在于用户ID在两个表中多次出现,这意味着我的VLOOKUP卡在了第一个值上。

Table 1 relates to Messages sent to users 表1与发送给用户的消息有关

在此处输入图片说明

Table 2 relates to Orders made by users 表2与用户下的订单有关

在此处输入图片说明

I want to compare the two tables and see if a user has placed an order within 14 days of being sent each message. 我想比较两个表,看看用户是否在发送每条消息后的14天内下了订单。

I have tried using a Pivot for table 2 with UserID across the top and date down the left, then using Vlookup and Hlookup to return a value for the exact date but I can never get past looking at an exact date or the first value rather than all values. 我尝试过使用表2的数据透视表,其顶部的UserID和左侧的日期向下,然后使用Vlookup和Hlookup返回确切日期的值,但我永远都不会过去查看确切的日期或第一个值,而不是所有值。

Since you are just wanting to say "Yes" or "No" that a record exists based on multiple criteria, I think =COUNTIFS() is the way to go. 由于您只想说“是”或“否”,表明存在基于多个条件的记录,因此我认为= COUNTIFS()是可行的方法。 COUNTIFS() lets you make a count of rows that match multiple conditions. COUNTIFS()使您可以对匹配多个条件的行进行计数。 – JNevill Mar 15 '16 at 17:33 – JNevill '16 Mar 15'17:33

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

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