最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Dynamic Range in Google Sheets Pivot Table - Stack Overflow

programmeradmin0浏览0评论

I want to build pivot table with dynamic range in "Google Sheets". Please help me with the same.

In Microsoft Excel we can achieve this with Offset function in pivot table. I am looking for similar solution.

I have tried using Named Range, Offset Function and also app script but none of them is working.

I want to build pivot table with dynamic range in "Google Sheets". Please help me with the same.

In Microsoft Excel we can achieve this with Offset function in pivot table. I am looking for similar solution.

I have tried using Named Range, Offset Function and also app script but none of them is working.

Share Improve this question asked Aug 6, 2019 at 15:31 Sai KrishnaSai Krishna 1352 silver badges9 bronze badges 6
  • 1 Thanks for your question; it is typical to provide some sample script/formula to show what you have tried and any errors or issues you have based on that. – Aleister Tanek Javas Mraz Commented Aug 6, 2019 at 15:33
  • 1 I just tried in random way with knowledge of Microsoft Excel but that is not right way. So I can say I don't know how to achieve it. – Sai Krishna Commented Aug 6, 2019 at 15:42
  • Take a look at this Q&A from StackOverflow: stackoverflow./questions/30574709/… – Aleister Tanek Javas Mraz Commented Aug 6, 2019 at 15:44
  • There is an exmple here about updating pivot tables, in essence you're building it again with a new range, is this what you are trying to do? – AMolina Commented Aug 7, 2019 at 10:06
  • Thanks Aleister. My data was starting from 2nd row. I changed it to 1st and followed this solution. – Sai Krishna Commented Aug 18, 2019 at 13:03
 |  Show 1 more ment

2 Answers 2

Reset to default 4

This feature is not available in Sheets in the same way it is in Excel. I remend looking into the query() formula, which takes some more setup but is more powerful in many ways.

The Sheets documentation can be found here and I've found this tutorial from Ben Collins to be extremely helpful in the past.

If you are filling the entire Google spreadsheet - you can just use COLUMN names for full height and skip row numbers: your-source-sheet!A:Z Make sure you do not have empty rows at the bottom of the spreadsheet.

发布评论

评论列表(0)

  1. 暂无评论