如何在 Excel 中创建一个公式,用于搜索一列(外部工作表)中的值和另一列(同一外部工作表)中的另一个值
我有两张 Excel 工作表,需要查看其中一张(较小)中的项目是否已包含在另一张中。
问题:列不一样。有些是,但不是全部,索引项目是重复的(客户)。
我想使用(例如)“客户”和“发票#”作为索引,因为这些项目都在两个工作表中,并在工作表 02 中搜索“发票编号”和“金额”,然后返回到工作表 01,比较“金额”。
示例:
表 1
客户 | 发票 | 金额 | Sheet2 的发票金额 | 发票确认 | 金额确认 |
---|---|---|---|---|---|
Paul | 45 | $345 | $3450 | 匹配 | 不匹配 |
Peter | 139 | $265 | $2.65 | 匹配 | 不匹配 |
Paul | 425 | $345 | $345 | 匹配 | 匹配 |
彼得 | 279 | $5.265 | $5.265.000 | 匹配 | 不匹配 |
1.000 行
表 2
客户 | 发票 | 金额 |
---|---|---|
Paul | 45 | $3450 |
Peter | 139 | $2.65 |
Paul | 425 | $345 |
Cesar | 478 | $7.345 |
Peter | 279 | $5.265。 000 |
234k 行
I have two Excel sheets and need to see if items in one of them (smaller) are already included at the other.
Problem: columns are not the same. Some are, but not all, and indexed items are duplicated (customers).
I´d like to use (for example) "customer" and "invoice #" as index, because these items are in both sheets, and search for "invoice number" and "amount" in sheet 02, and return to sheet 01, to compare "amount".
Example:
Sheet 1
Customer | Invoice | Amount | Amount for sheet2 | Invoice Confirmation | Amount confirmation |
---|---|---|---|---|---|
Paul | 45 | $345 | $3450 | match | not match |
Peter | 139 | $265 | $2.65 | match | not match |
Paul | 425 | $345 | $345 | match | match |
Peter | 279 | $5.265 | $5.265.000 | match | not match |
1.000 lines
Sheet 2
Customer | Invoice | Amount |
---|---|---|
Paul | 45 | $3450 |
Peter | 139 | $2.65 |
Paul | 425 | $345 |
Cesar | 478 | $7.345 |
Peter | 279 | $5.265.000 |
234k lines
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 INDEX & 尝试以下操作: MATCH 函数,或者如果您使用 O365,则使用带有 布尔 逻辑的 XLOOKUP 函数
• 单元格 D3 中使用的公式 - 2 种方式,
Approach_One -->输入公式后确认输入
CTRL
+SHIFT
+ENTER
而不是仅ENTER
,因为它是数组公式< strong>Approach_Two
• 单元格 E3 中使用的公式 - 2 种方式,
Approach_One
Approach_Two
• 单元格 F3< 中使用的公式/strong> - 2种方式,
Approach_One
Approach_Two
自定义格式为 -->选择范围-->按
CTRL
+1
-->设置单元格格式对话框 -->数字选项卡 -->类别-->定制-->输入以下内容 -->使用布尔逻辑是一种更灵活的方法,因为可以根据需要调整语法以使用其他逻辑运算符和其他函数。
Here is what you can try, using INDEX & MATCH Function or if you are using O365 then use XLOOKUP Function with Boolean Logic
• Formula used in cell D3 - 2 ways,
Approach_One --> Confirm enter
CTRL
+SHIFT
+ENTER
instead of justENTER
after entering the formula, since its an array formulaApproach_Two
• Formula used in cell E3 - 2 ways,
Approach_One
Approach_Two
• Formula used in cell F3 - 2 ways,
Approach_One
Approach_Two
And Custom Format as --> Select the range --> Press
CTRL
+1
--> Format cells Dialog --> Number Tab --> Category --> Custom --> Type the below -->Using of Boolean Logic is a more flexible approach since the syntax can be adjusted to use other logical operators and other functions as needed.