I hope someone is able to help - really been going in circles on this one trying to figure out what to do. To give some background on my situation:

I have 182 days of data for 500+ stores, and am tasked with finding of those 182 days, how many times inventory at the store level fell below 10 units. I have done a simple SUMIF for each line to find the # of times this occurred, but I also am looking to find the average time that a store stays below that level. So for instance, store #50 has had 60 days where stock was below 10 units. Of those 60 days, there were "stockout" durations of 10, 15, 5, 12, and 18 for an average period of 12 days.

Is there a way/formula to get to where I am trying to go? Spent about 3 hours yesterday searching all through posts on here to no avail. I found a lot of information using FREQUENCY and the MAX functions but haven't had any luck getting to where i need to. Below is where i got(with the data from C41:GB41 for store #50

=MAX(FREQUENCY(IF(C41:GB41<10,ROW(C41:GB41)),IF(C41:GB41>10,ROW(C41:GB41))))

Thanks for any help that can be offered!!