Comments on: Excel Sums with Multiple Criteria
http://ask.metafilter.com/91916/Excel-Sums-with-Multiple-Criteria/
Comments on Ask MetaFilter post Excel Sums with Multiple CriteriaTue, 20 May 2008 09:30:42 -0800Tue, 20 May 2008 09:30:42 -0800en-ushttp://blogs.law.harvard.edu/tech/rss60Question: Excel Sums with Multiple Criteria
http://ask.metafilter.com/91916/Excel-Sums-with-Multiple-Criteria
Help me recreate these charts in Excel <br /><br /> I am trying to recreate <a href="http://www.shipbuildinghistory.com/today/shippingstatistics/tankvessels.htm">these charts </a>in Excel. I have all of the data, but I want to manipulate it and create similar charts.<br>
<br>
I cannot come up with the appropriate SUMIF or DSUM formulas that allow me to do this. Basically, I need a formula that says:<br>
1) Pick a type of ship<br>
2) Was the ship in service in the year in question?<br>
3) Sum the gross tonnage of all ships that meet these criteria.<br>
<br>
The hang up is the requirement of absolute references in the SUMIF and DSUM formulas (i.e. "Year=1990). I need a formula that I can drag across multiple years.post:ask.metafilter.com,2008:site.91916Tue, 20 May 2008 09:18:41 -0800Frank GrimesexcelsumifdsumchartBy: inigo2
http://ask.metafilter.com/91916/Excel-Sums-with-Multiple-Criteria#1346787
What's your data look like? Do you have a row/column of years? If so, and if I understand, you could do "Year=A3" and drag it across/down as necessary, no?comment:ask.metafilter.com,2008:site.91916-1346787Tue, 20 May 2008 09:30:42 -0800inigo2By: desjardins
http://ask.metafilter.com/91916/Excel-Sums-with-Multiple-Criteria#1346869
Can you manipulate the data into something like this? You'll have lots of repeating rows. Then you can make a pivot chart and group by years and ship type. (I'm totally making up these values because I know jackshit about shipping.)<br>
<br>
A | B | C<br>
ShipType | YearsInService | Tonnage<br>
<br>
S/H Barge | 1990 | 15000<br>
S/H Barge | 1991 | 15000<br>
D/H Barge | 1990 | 20000<br>
<br>
Your value in the pivot chart will be the sum of tonnage. Your legend field will be the ship type, and the axis field will be the years in service.comment:ask.metafilter.com,2008:site.91916-1346869Tue, 20 May 2008 10:24:38 -0800desjardinsBy: alrightokay
http://ask.metafilter.com/91916/Excel-Sums-with-Multiple-Criteria#1346870
I'm using Excel 2007 but it shouldn't be too different for 2003. Type of ships should be rows (i.e. left-hand side data) and years should be your column headers. The numbers should indicate the count of each ship in a given year. Select the data set that you want to graph and choose "Area Chart." Note that each boat type should have its own series. To get the x-axis to look like years, choose X-axis "label" range as the column headers. That should just about do it unless I'm reading those plots incorrectly. Hope this helps!comment:ask.metafilter.com,2008:site.91916-1346870Tue, 20 May 2008 10:25:14 -0800alrightokayBy: desjardins
http://ask.metafilter.com/91916/Excel-Sums-with-Multiple-Criteria#1346874
<a href="http://img512.imageshack.us/my.php?image=24520433bf1.gif">quick and dirty example</a>comment:ask.metafilter.com,2008:site.91916-1346874Tue, 20 May 2008 10:28:28 -0800desjardinsBy: Frank Grimes
http://ask.metafilter.com/91916/Excel-Sums-with-Multiple-Criteria#1346944
These are very close, but the problem I keep having is that there is a "Delivered" Column when the ship went into service and a "Disposition" Column when it was scrapped. I want to add every year that it is in service and stop adding when it is scrapped. It's not a hug data set, so it's probably easier to do manually. I was hoping Excel could make it easier.comment:ask.metafilter.com,2008:site.91916-1346944Tue, 20 May 2008 11:12:10 -0800Frank GrimesBy: desjardins
http://ask.metafilter.com/91916/Excel-Sums-with-Multiple-Criteria#1347095
You can subtract the date fields to determine the number of years. For example: <br>
<br>
delivered | disposed | number of years<br>
5/1/1990 | 5/1/2007 | =YEAR(B1) - YEAR(A1)<br>
<br>
After that I get a little fuzzy, but maybe someone can come along to tell you how to extrapolate exactly which years were between A1 and B1.comment:ask.metafilter.com,2008:site.91916-1347095Tue, 20 May 2008 12:48:55 -0800desjardinsBy: mrpeach
http://ask.metafilter.com/91916/Excel-Sums-with-Multiple-Criteria#1347234
You can do this using the sumproduct command, <a href="http://www.savefile.com/files/1564486">here</a> is a spreadsheet example with the formula in it. It checks the type, then looks at delivery year and then the dispose year. You do have to have something in the dispose column though so if a ship is still in service you can just put a "-" and it should work fine.comment:ask.metafilter.com,2008:site.91916-1347234Tue, 20 May 2008 14:02:18 -0800mrpeachBy: pompomtom
http://ask.metafilter.com/91916/Excel-Sums-with-Multiple-Criteria#1347535
There's a solution <a href="http://users.tpg.com.au/pomtom/Tonnage.xls">here</a>.comment:ask.metafilter.com,2008:site.91916-1347535Tue, 20 May 2008 18:10:59 -0800pompomtom