Hi,

I know how to calculate the average excluding zeros. But what I want is something more akin to 'keep going until you find 7 non-zero values, and average that". So if I had a range of 30 items, and was at the 9th cell, I would start averaging from where I was, and go backwards. If I found 7 non-zero values, I would average that, otherwise I would go forwards. If neither worked, I would pick the one that had the highest number of non-zero values to average with.

This sounds great in my head but I have no idea how to implement it x_x. Help would be appreciated.