Programatically select a subset of a column
I want to be able to average, or other function, over a subset of the cells in a row. The number of cells I want to include is specifiied in a separate cell.
In Excel, I accomplished this with OFFSET. I read another article here noting that smartsheet doesn't have OFFSET, but that MATCH and INDEX might be able to be used depending on the intent.
Would there be a way to "average N rows" where N is a value in a cell? Suggestions?
Thank you.
Comments
-
Chris, that is an interesting problem! I haven't had to do exactly that but I've done something similar. One way to do that is to have another column I will refer to as the "Index" numbered from the top of the area you want to average. Then use a SUMIF or SUMIFS function to sum all the values in rows where the Index is less than or equal to the N and then divide that value by N. That should give you the average of the first N values. A little messy since you have to create another Index column but I think it will work.
Jim
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!