# Count number of temperature swings over a 2 month period

#### Barque

##### New Member
I have searched the forums and have not seen a question like this asked:

I am trying to count the number of times Average temperature moves by X %, up or down, over a specified time period, or on a rolling N day lookback.

For example: Over the past 20 days, how many times has Avg Temp moved (ABS, up or down) by 10%, 30%? Over the past 40 days? etc.

I am trying to work things using local min and max values, and countifs but cannot get much traction.

My data looks like the below. Any suggestions or links are appreciated.

### Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a \$25,000 loan, 5% annual interest, 60 month loan.

##### Well-known Member
I think you can use with helper column and then hide it.
Formula for Helper Column ( first Average temp at C2):
Excel Formula:
``=((C3-C2)/C2)*100``

and then Use countif:
Excel Formula:
``=COUNTIF(G2:G19,">"&10)``

Replies
0
Views
178
Replies
1
Views
426
Replies
5
Views
97
Replies
4
Views
222
Replies
10
Views
1K

1,130,129
Messages
5,640,285
Members
417,134
Latest member
fjleroux187

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back