从多个Google表格中提取数据并将它们合并到一个单独的表格中

huangapple go评论83阅读模式
英文:

Fetch Data from multiple Google Sheets and combine them into a single sheet

问题

我尝试从多个Google表格中获取数据,并将其合并到另一个Google表格中。
这些表格包含每月客户的数据。
我想创建一个包含完整客户数据的主表格。
我尝试了ImportRange公式,但它不会获取其他表格的数据,而且以前的数据会被删除。

假设有3个Google表格,分别是“1月”,“2月”和“3月”。
我有一个名为“主客户数据”的Google表格,我想将完整的客户详细信息添加到此表格中(如果将来在“1月”,“2月”和“3月”表格中更新数据,那么这个表格“主客户数据”需要自动更新)。

附注:数据包括出生日期、姓名、联系电话和用户ID(数字和字母的混合)。

谢谢

英文:

I'm trying to fetch data from multiple google sheets into another google sheet.
The sheets contain data of the customers on a monthly basis.
I want to create a master sheet with the complete customer data.
I tried the ImportRange formula but it does not take the other sheet's data and the previous data gets deleted.

Suppose there are 3 Google Sheets, namely, "Jan", "Feb", "March"
I have a Google sheet named "Master customer Data", I want to add the complete customer details in this sheet ( if in the future the data gets updated (in "Jan", "Feb", and "March" Sheets) then this sheet ("Master customer Data") needs to be updated automatically).

P.S: The data contains: DOB, Names, contact numbers and User IDs (mix of numbers and alphabets)

Thank you

答案1

得分: 2

尝试这个,将"sheet_link"替换为你的数据表链接:

=Query({IMPORTRANGE("sheet_link", "Jan!A:D");IMPORTRANGE("sheet_link", "Feb!A:D");IMPORTRANGE("sheet_link", "March!A:D")},"select Col1, Col2, Col3, Col4 where Col1 is not null")

它将返回来自三个表格的所有行,这些行的第一列不为空。你可以根据需要编辑"Col1"或添加多个条件。
你也可以添加更多的表格。

如果公式显示错误,请等待几秒,因为加载需要时间。

英文:

Try this, replace the sheet_link with your data sheet links:

=Query({IMPORTRANGE("sheet_link", "Jan!A:D");IMPORTRANGE("sheet_link", "Feb!A:D");IMPORTRANGE("sheet_link", "March!A:D")},"select Col1, Col2, Col3, Col4 where Col1 is not null")

It will return all rows from 3 sheets whose 1st column is not blank. You may edit "Col1" as required or add multiple conditions.
You may also add more sheets.

Do wait for a few seconds if the formula shows an error as it takes time to load.

huangapple
  • 本文由 发表于 2023年3月7日 15:56:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/75659275.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定