【发布时间】:2017-10-16 12:51:29
【问题描述】:
我有一个包含 2 个工作表的 excel 文件。
在名为“数据”的第一个工作表上,我想从名为“列表”的第二个工作表中查找数据。我需要查找的数据来自查找值的左侧和右侧。因此,我想知道您对同时从双方收集数据的最佳公式或代码的建议。
Worksheet 1 name "Data" > Value to look up is in "B7" is "John"
Worksheet 2 name "List" > Matching value to be looked up is in "D7" is "John"
> Return a value from "A7" -3 cells to the left
> Return a value from "G7" 3 cells to the right
有什么建议吗?
【问题讨论】:
-
假设“要查找的匹配值在“D7”中”表示匹配值在D列的某处,但是你需要找到哪里,这听起来像
MATCH和INDEXExcel 函数的工作。 -
我使用了 MATCH 和 INDEX,它工作得很好。谢谢
标签: excel excel-formula formula lookup vba