ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   calculating sum and average values for specific days only (https://www.excelbanter.com/excel-discussion-misc-queries/241492-calculating-sum-average-values-specific-days-only.html)

Soccerboy83

calculating sum and average values for specific days only
 
i am currently have a list of alot of weather data, what i want to do is
calculate the sum and average for the data collected on a certain day. For
example i have 4 columns of values, 48 values for each day for a total of 12
months, so alot of numbers. Anyway what i want to do is have a formula that
will calculate the sum and average values i need according to the date i
specify (and only that date). Is there anyway i can do this, i seriously
have tried everything, and am so lost.

Example
Date: Max. Temp. Min. Temp. Wind Speed Humidity
1/1/09 47 22 4.7 x
1/1/09 48 19 5.0 x
1/1/09 49 21 1.0 x
....
....
....
12/31/09 55 17 2.2 x
12/31/09 56 15 1.7 x
12/31/09 54 23 1.3 x

Sean Timmons

calculating sum and average values for specific days only
 
so, your date will be in, say, Sheet2!A2 and the below table is in Sheet1

in B2, =SUMIF(Sheet1!$A$2:$A$10000,A2,Sheet1!$B$2$B$10000 ) gives sum of Max
Temp.
=SUMIF(Sheet1!$A$2:$A$10000,A2,Sheet1!$B$2$B$10000 )/COUNTIF(Sheet1!$A$2:$A$10000,A2) Gives Average of Max Temp.

"Soccerboy83" wrote:

i am currently have a list of alot of weather data, what i want to do is
calculate the sum and average for the data collected on a certain day. For
example i have 4 columns of values, 48 values for each day for a total of 12
months, so alot of numbers. Anyway what i want to do is have a formula that
will calculate the sum and average values i need according to the date i
specify (and only that date). Is there anyway i can do this, i seriously
have tried everything, and am so lost.

Example
Date: Max. Temp. Min. Temp. Wind Speed Humidity
1/1/09 47 22 4.7 x
1/1/09 48 19 5.0 x
1/1/09 49 21 1.0 x
...
...
...
12/31/09 55 17 2.2 x
12/31/09 56 15 1.7 x
12/31/09 54 23 1.3 x


Soccerboy83

calculating sum and average values for specific days only
 
This worked out great, thank you very much.

"Sean Timmons" wrote:

so, your date will be in, say, Sheet2!A2 and the below table is in Sheet1

in B2, =SUMIF(Sheet1!$A$2:$A$10000,A2,Sheet1!$B$2$B$10000 ) gives sum of Max
Temp.
=SUMIF(Sheet1!$A$2:$A$10000,A2,Sheet1!$B$2$B$10000 )/COUNTIF(Sheet1!$A$2:$A$10000,A2) Gives Average of Max Temp.

"Soccerboy83" wrote:

i am currently have a list of alot of weather data, what i want to do is
calculate the sum and average for the data collected on a certain day. For
example i have 4 columns of values, 48 values for each day for a total of 12
months, so alot of numbers. Anyway what i want to do is have a formula that
will calculate the sum and average values i need according to the date i
specify (and only that date). Is there anyway i can do this, i seriously
have tried everything, and am so lost.

Example
Date: Max. Temp. Min. Temp. Wind Speed Humidity
1/1/09 47 22 4.7 x
1/1/09 48 19 5.0 x
1/1/09 49 21 1.0 x
...
...
...
12/31/09 55 17 2.2 x
12/31/09 56 15 1.7 x
12/31/09 54 23 1.3 x



All times are GMT +1. The time now is 05:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com