[英](Google Sheets) Get Value from Another Spreadsheet Based On Row Info
I have a spreadsheet (A) with 1000 rows of data.我有一个包含 1000 行数据的电子表格(A)。 Each row as a unique ID for example "#956"
每行作为唯一 ID ,例如“#956”
I then have another spreadsheet (B) that has rows that reference these IDs.然后我有另一个电子表格(B),其中包含引用这些 ID 的行。
My spreadsheet (A) contains columns I would like to appear in my spreadsheet (B).我的电子表格 (A) 包含我希望出现在我的电子表格 (B) 中的列。
In a column within my spreadsheet (B), could I use a formula to reference specific columns of information, that appear on certain rows, within my spreadsheet (A).在我的电子表格 (B) 中的一列中,我是否可以使用公式来引用出现在我的电子表格 (A) 中某些行上的特定信息列。
So in summary, using the unique ID's eg "#999" in my spreadsheet (B).因此,总而言之,在我的电子表格 (B) 中使用唯一 ID,例如“#999”。 I would like to reference columns of information that are in my spreadsheet (A).
我想引用电子表格 (A) 中的信息列。
Yes, you can.是的你可以。 You should use Vlookup and Importrange formulas.
您应该使用 Vlookup 和 Importrange 公式。
Importrange returns you an array and you can reference it using formulas. Importrange 返回一个数组,您可以使用公式引用它。
Let's say that your ID's are in column A of each spreadsheet.假设您的 ID 在每个电子表格的 A 列中。 You are in spreadsheetA in row 5 and look for a value in spreadsheeetB with the same ID.
您在第 5 行的 spreadsheetA 中,并在 spreadsheeetB 中查找具有相同 ID 的值。 Your vlookup formula will look like this:
您的 vlookup 公式将如下所示:
=vlookup(A5,importrange("[spreadsheetB url]","a1:z"),[index],false) =vlookup(A5,importrange("[spreadsheetB url]","a1:z"),[index],false)
[index] - is a number of column from which you want to get a value. [索引] - 是您要从中获取值的列数。
You need to have access to both spreadsheets and allow access when running formula for the first time.您需要有权访问这两个电子表格,并在首次运行公式时允许访问。
Is this what you are looking for?这是你想要的?
if unique id is in both spreadsheets in A column go for:如果唯一 ID 在 A 列 go 的两个电子表格中用于:
=ARRAYFORMULA(IFNA(VLOOKUP(A2:A, IMPORTRANGE("URL_or_ID", "Sheet_name!A2:L"), {11, 12}, 0)))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.