You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Excel中如何跨表匹配将单元格值替换为对应关联分类值

Excel城市所属地块跨表匹配方案

现有数据表说明

  • 城市-地块映射表database1,核心字段为城市编号city、地块编号land,数据如下:
database1
city land
 1    1
 2    1
 3    2
 4    2
  • 观测事件表database2,核心字段为事件名称、事件发生城市编号city,数据如下:
database2
     -       city
observation1   4
observation2   3
observation3   1
observation4   1

需求说明

为database2的每条观测记录匹配对应城市所属的地块,最终得到如下结果:

-       city   land
observation1   4      2
observation2   3      2
observation3   1      1
observation4   1      1

实现方法

可使用Excel的XLOOKUP函数完成匹配,意大利语版Excel对应函数名为cerca.x,公式如下:

landdatabase2 =XLOOKUP(citydatabase2;citydatabase1;landdatabase1)

参数说明:

  • 第一个参数citydatabase2:database2中待匹配的城市单元格
  • 第二个参数citydatabase1:database1中存储城市编号的列范围
  • 第三个参数landdatabase1:database1中存储地块编号的列范围,匹配成功后返回对应行的该列值

内容的提问来源于stack exchange,提问作者user15499252

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.09.25 17:24:05