Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
illston
 
Posts: n/a
Default Relationship Math Across a Row


Greetings,

I have a dataset of year/month/rainfall data that I am doing some
simple statistics (average, std dev, etc.) upon. I have what I hope is
a simple question. How can I scan column B (month), match a certain
month, and do a certain stastic upon all of the rainfall for that
month....for example:

1970 01 1.35
1970 02 3.45
1970 03 5.33
1971 01 0.99
1971 02 4.30
1971 03 5.12
1972 01 0.21
1972 02 2.22
1972 03 7.08

I want one cell to give the average rainfall for March, or the Std Dev
for March, etc. I would like to set up a template of forumulas so that
I can just drop any data (each state county) and have teh statistics at
the top. So, I assume a B:B will be involved to handle varying data
lengths (or at least a b10:b1000, for a buffer).

I looked at SUM_PRODUCT, but it doesn't really do what I need, plus I
am doing more than just a sum.

Any ideas before I start writing a perl script to do this? :)

Thanks,
Brad


--
illston
------------------------------------------------------------------------
illston's Profile: http://www.excelforum.com/member.php...o&userid=23771
View this thread: http://www.excelforum.com/showthread...hreadid=374152

  #2   Report Post  
Cutter
 
Posts: n/a
Default


If you used SUMPRODUCT to get the total amount for the month and then
divide it by a count of the times that month occurs in your list you'd
get the average. Use =COUNTIF(B10:B1000,01) to get the number of
Januarys.


--
Cutter
------------------------------------------------------------------------
Cutter's Profile: http://www.excelforum.com/member.php...fo&userid=9848
View this thread: http://www.excelforum.com/showthread...hreadid=374152

  #3   Report Post  
illston
 
Posts: n/a
Default


What about other statistics like Standard Deviation? or Variance?

Thanks for the help,
Brad


--
illston
------------------------------------------------------------------------
illston's Profile: http://www.excelforum.com/member.php...o&userid=23771
View this thread: http://www.excelforum.com/showthread...hreadid=374152

  #4   Report Post  
MrShorty
 
Posts: n/a
Default


How about using an advanced filter on the list. You could tell the
filter to extract all the month 3's to a different worksheet, then
perform your statistical calculations on the data on that sheet. Not
quite as automatic as a single function, because you would have to call
the filter command each time you wanted to look at a different month.
Or do it all ahead of time and filter the list several times until you
have each month on it's own spreadsheet.


--
MrShorty
------------------------------------------------------------------------
MrShorty's Profile: http://www.excelforum.com/member.php...o&userid=22181
View this thread: http://www.excelforum.com/showthread...hreadid=374152

  #5   Report Post  
MrShorty
 
Posts: n/a
Default


If you don't like the idea of filtering, how about this solution. I'll
use the data you list above in columns A, B, and C starting in Row 11
(so I can output the statistics of interest at the top of the sheet).

In A1 enter number for month of interest eg 1.
In A2 enter formula =sumif(B11:B19,$A$2,C11:C19)/countif(B11:B19,$A$2).
this is the average for the month requested in A1.
In D11 enter formula =(B11-$A$2)^2 and copy down. this will be used
for calculating variance.
In A3 enter formula
=sumif(B11:b19,$A$1,d11:d19)/(countif(b11:b19,$A$1)-1). This is the
variance s^2. standard deviation is the square root of the variance
sqrt(s^2).
MAX and MIN were easily obtained by adding another column
E11=IF(b11=$A$1,C11,"") then using the MAX/MIN functions on that
column. Others could help in obtaining the year the MAX/MIN occurred.

Does that help?


--
MrShorty
------------------------------------------------------------------------
MrShorty's Profile: http://www.excelforum.com/member.php...o&userid=22181
View this thread: http://www.excelforum.com/showthread...hreadid=374152

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Excel or Access for relationship webs aspiringbodhisattva Charts and Charting in Excel 0 March 23rd 05 04:45 PM
math symbols functions Fontless New Users to Excel 1 March 6th 05 08:36 PM
Cell Reference Math Ralph Howarth Excel Worksheet Functions 0 January 26th 05 06:27 PM
Predicting new Ys given new Xs using known relationship for X and malwatson Excel Discussion (Misc queries) 2 January 12th 05 09:07 PM
Vlookup with "many to many" relationship? goofy11 Excel Worksheet Functions 3 December 9th 04 05:09 PM


All times are GMT +1. The time now is 02:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"