如何使用来自其他 sheet 的数据设置外键?
how set a foreign key using data from other sheet?
我在使用 ms-excel 时遇到一些问题,因为我想使用其他 sheet 数据设置外键。我试过使用 vlookup 但它 return #VALUE!
下面是我的数据示例:
Sheet 1
Key data1 data2
john doe
alex sanchez
will smith
Sheet 2
Key data1 data2
1 alex sanchez
2 john doe
3 will smith
我期望的结果:
Sheet 1
Key data1 data2
2 john doe
1 alex sanchez
3 will smith
抱歉我的英语不好
如果您的数据 1 和数据 2 的组合对于每个键都是唯一的,您可以连接 2 以创建一个额外的键来回填键值。
=CONCATENATE(B2,C2)
我在使用 ms-excel 时遇到一些问题,因为我想使用其他 sheet 数据设置外键。我试过使用 vlookup 但它 return #VALUE!
下面是我的数据示例:
Sheet 1
Key data1 data2
john doe
alex sanchez
will smith
Sheet 2
Key data1 data2
1 alex sanchez
2 john doe
3 will smith
我期望的结果:
Sheet 1
Key data1 data2
2 john doe
1 alex sanchez
3 will smith
抱歉我的英语不好
如果您的数据 1 和数据 2 的组合对于每个键都是唯一的,您可以连接 2 以创建一个额外的键来回填键值。
=CONCATENATE(B2,C2)