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
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!