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
- 63.9K Get Help
- 410 Global Discussions
- 220 Industry Talk
- 458 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!