# stdev with big data

#### jcb5489

##### New Member
I have daily values over many years of data. I need to find the standard deviation for each day from its monthly average for the complete data set. Column a has dates, column b has values. Please help.

### Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Welcome to MrExcel.

Have you tried a pivot table?

I have not.

Prof gave vlookup as a hint. Any suggestions using that function?

I have daily values over many years of data. I need to find the standard deviation for each day from its monthly average for the complete data set. Column a has dates, column b has values.

Prof gave vlookup as a hint.

I suggest that you clarify the assignment with the prof, and/or post the problem statement exactly as it is written in the assignment. There are several interpretations based on your brief description.

My interpretation: calculate the std dev from the monthly trailing (simple) moving average ending with each daily value.

If the data is for traded securities, I would simply use 21 trade days for each month. So, I would put the formula =STDEVP(A2:A22) into C22 and copy down, assuming the data starts in row 2.

(On average, there are 252 trade days per year; hence, 252/12 = 21 trades per month. The use of STDEVP v. STDEV for this purpose is debatable.)

But if you should use VLOOKUP, perhaps "each month" is defined as the data starting up to one calendar month before. Even so, I would not use VLOOKUP. Instead, I would put the following formula into C32 and copy down:

=STDEVP(INDEX(B2:B32,MATCH(A32-30,A2:A32,1)):B32)

(The use of A32-30 v. EDATE(A32,-1) is debatable. But note what EDATE returns when A32 is Mar 31 or Oct 31, for example.)

Replies
12
Views
1K
Replies
1
Views
114
Replies
0
Views
159
Replies
4
Views
614
Replies
14
Views
811

1,196,130
Messages
6,013,620
Members
441,777
Latest member

### 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.
Allow Ads at MrExcel

### Which adblocker are you using?

Follow these easy steps to disable AdBlock

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

### Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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