Every 5th Value
I have a range that is 1 row high and twenty-some-odd columns wide. I need to AverageIF() some of the values in this field together, starting by looking at only every 5th column and then if they're not equal to 0. The 0 part is easy, as is setting up the AverageIF(), but where I'm having trouble is in finding a way to get every 5th column. Theoretically, I could do something like MOD(Position(@cell),5)=0, but so far as I can tell, there is no Position() function, something that checks the position in an array of a given value. the closest I can find is Match(), but that requires a specific search value, which would negate the point of this function.
There also seem to be precious few functions that can reference non-adjacent values. Ideally, I'd use a SumIF() function and just manually divide by the number of values [ignoring for the moment the lack of an ArrayLength() function], but that requires an adjacent range, just like AverageIF().
I want to avoid doing this manually [Sum(Column5@row, Column10@row, Column15@row, ...)] as much as possible, as there's going to be, like, twenty instances of this formula each for a half dozen different sheets and I'm not likely to be the one who has to update it. I've been over the functions list [Functions List | Smartsheet Learning Center] a half a dozen times now and I'm not seeing anything that will do it. Am I just missing something? Or does anybody have a workaround?
Best Answer
-
Hi @Nik Fuentes
I agree with @Paul Newcome. Since Smartsheet doesn't have a Position function, bringing every 5th column together in some way (whether through helper columns or by always having them together at the beginning so you can create a range) is the way to do this.
Please provide your feedback to the Product team through this form, here!
Cheers,
Genevieve
Join us for Jumpstart 2025 with Community on 23 January (in two time zones)! 🎉 Register here.
Answers
-
My suggestion for ease of management and overall build would be to insert helper columns (that can later be hidden) next to each other and then use direct cell references to pull the non-adjacent column data into the adjacent columns.
-
A workable idea, but unfortunately these sheets are going to be growing in width [in sets of 5 columns] in the future, so I was hoping to avoid adding more columns and it still has the problem of needing to be updated manually with every new addition.
The helper columns are probably going to end up being my fall-back if I can't find a better solution.
-
Hi @Nik Fuentes
I agree with @Paul Newcome. Since Smartsheet doesn't have a Position function, bringing every 5th column together in some way (whether through helper columns or by always having them together at the beginning so you can create a range) is the way to do this.
Please provide your feedback to the Product team through this form, here!
Cheers,
Genevieve
Join us for Jumpstart 2025 with Community on 23 January (in two time zones)! 🎉 Register here.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.1K Get Help
- 444 Global Discussions
- 142 Industry Talk
- 472 Announcements
- 5K Ideas & Feature Requests
- 83 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 489 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!