vlookup带有2列的search_key和range

发布于 2025-02-07 05:47:01 字数 403 浏览 2 评论 0 原文

我正在努力寻找一种使用vlookup的方法,其中search_key和范围都是2列。在这两个床单(我正在使用Ingrange的单独工作簿)中,我有2列具有名字和姓氏。 Sheet1还包含租赁日期,我想将租赁日期从Sheep1填充到Sheet2中的一列。

如果我将名字和姓氏合并到两个床单上的一个列中,我就可以完成我想要的。不幸的是,这不是一个永久解决方案,因为还有其他依赖性必须保留单独的列。

我创建了一本测试WorrkBook来展示该问题。

I am struggling to find a way to use a VLOOKUP where the both the search_key and range are 2 columns. In both sheets (seperate workbooks for which I am using IMPORTRANGE) I have 2 columns with First Name and Last Name. The Sheet1 also contains the Hire Date, and I would like to populate the Hire Date from Sheet1 into a column in Sheet2.

I accomplish what I want if I merge the First Name and Last Name into a single column on both sheets. Unfortunately, this cannot be a permanant solution since there are other dependancies where the names must remain seperate columns.

I have created a test worrkbook to showcase the issue.
https://docs.google.com/spreadsheets/d/1v3coBJRwJEbrrdgcflV4-dssKgknS-T2werWVjPwxEA

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

奈何桥上唱咆哮 2025-02-14 05:47:01

将此公式放入单元 Sheet2!c1 中:

=arrayformula( 
  iferror( 
    vlookup( 
      A1:A & B1:B, 
      { Sheet1!A1:A & Sheet1!B1:B, Sheet1!C1:C }, 
      2, false 
    ) 
  ) 
)

然后将结果列格式为 format>数字>日期

Put this formula in cell Sheet2!C1:

=arrayformula( 
  iferror( 
    vlookup( 
      A1:A & B1:B, 
      { Sheet1!A1:A & Sheet1!B1:B, Sheet1!C1:C }, 
      2, false 
    ) 
  ) 
)

Then format the result column as Format > Number > Date.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文