I have a data set that's from measuring gas concentration. basically, gas is injected into a chamber quickly (so concentration goes up over time), and then dissipates slowly (so, concentration goes down over time). There's a bit of noise in the concentration measurements, so sometimes the concentration measurement goes up a tiny bit during the "dissipation" phase of things.

Ultimately, I need to calculate the slope of the dissipation phase. This cycle happens a whole bunch of times each day -- injection, then dissipation.

Is there a way I can have excel automatically detect where the values are generally decreasing (allowing for the odd gas measurement that goes up a bit from instrumentation problems), select each of these ranges, and then spit out the slope of each?