You are here:

Excel/average for months

Advertisement


Question
Hi.what i want is very simple.I have a worksheet with two columns.Column A has 3840 dates (from 09/06/1959 to 8/30/2002) and column B has the rainfall value for each date (no zero values).I need a way to calculate the average of each month of the years without doing it manualy.My worksheet is like this:

06/09/1959   38.1        (date in European format dd/mm/yy)
16/09/1959   44.0
18/09/1959   34.0          
30/09/1959   2.0
07/10/1959   5.0
08/10/1959   19.0
09/10/1959   23.0
10/10/1959   1.0
11/10/1959   2.0
12/10/1959   14.0
30/10/1959   2.0
31/10/1959   1.0
01/11/1959   3.5
02/11/1959   0.3
03/11/1959   31.0
04/11/1959   10.4
06/11/1959   0.1
12/11/1959   0.1
13/11/1959   39.0
15/11/1959   6.0
16/11/1959   7.2
21/11/1959   0.1
22/11/1959   4.2
29/11/1959   1.1
30/11/1959   7.0
03/12/1959   37.0
04/12/1959   13.4
05/12/1959   11.0
06/12/1959   14.0
13/12/1959   7.0
14/12/1959   2.8
15/12/1959   11.8
18/12/1959   0.8
19/12/1959   3.0
20/12/1959   1.0
22/12/1959   22.6
24/12/1959   6.0
25/12/1959   16.0
28/12/1959   6.0
29/12/1959   4.8
03/01/1960   37.0
04/01/1960   1.5
07/01/1960   12.0
09/01/1960   5.5
10/01/1960   9.2
12/01/1960   48.5
13/01/1960   42.0
14/01/1960   1.0
15/01/1960   19.5
16/01/1960   1.0
17/01/1960   12.0
18/01/1960   3.8
19/01/1960   3.0
20/01/1960   1.0
23/01/1960   0.2
26/01/1960   1.0

Answer
Hello Stavros,

This is indeed simple, here's what you need to do:
1. Assuming your date is stored in Column B, and values are stored in Column C.
2. Insert the following formula in entire Column A and set the column heading as Month - =MONTH(B2)&"/"&YEAR(B2) - This will show the date in month / year format - 9/1959
3. Now select the range, click on Data Subtotals and add subtotals for every change in value for the Month column (Column A) and set the calculation as Average.

This should give you what you need

Hope this helps.

Gulshan.
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


GULSHAN PURSWANI

Expertise

I can answer questions related to the following topics: 1. MS Excel - Creating and Linking Formulae, Running Pivot Tables, Vlookup etc. 2. Macros / VBA - Creating Macros to do specific jobs. Importing / Exporting / Validating Data in excel through Macros.

Experience

I've been working on excel for over 10 years and on VBA macros for over 3 years now.

Education/Credentials
Bachelor of Commerce, Chartered Accountant from The Institute of Chartered Accountants of India

©2016 About.com. All rights reserved.