按照公共值,LibreOffice / Excel或CSV合并两个相关数据集 [英] Merge two related data sets by common value, LibreOffice/Excel or CSV
问题描述
我有两个数据集,它们是分开存储的,但它们是相关的,它们以不同的方式从不同的角度描述相同的现象。
I have two datasets, they are stored separately but they are related, they describe the same phenomenon, from different perspectives, in different ways.
编码并不是真正的结果,在这里他们被呈现为Excel / LibreOffice,但我也可以得到他们作为CSV。
The encoding is not really consequential, here they are rendered as Excel/LibreOffice but I can also get them as CSV.
一张工作表,工作表I
,如下所示:
One "sheet", Sheet I
, looks like this:
和表II
:
使用字段提交#
作为统一子我想创建一个单张,将相关的蓝色字段关联到相应的粉红色字段。
Using the field submission #
as the unifier I want to create a single sheet which will associate the related blue fields to the corresponding pink field.
例如,最终结果应如下所示:
For example, the final result should look like this:
推荐答案
在sheet1单元格 h2
insert:
On sheet1 cell h2
insert:
=VLOOKUP($B2,Sheet2!$A:$F,COLUMN(h2)-6,0)
$修复数据表和查找行。
您可以拖动具有黑色加号的函数,当您指向单元格的右下角时出现。
The $ fixes the data table and the row for the lookup. You can drag the function with the black plus sign which appears when you are pointing the right bottom of the cell.
这篇关于按照公共值,LibreOffice / Excel或CSV合并两个相关数据集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!