<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: Spreadsheets that do arbitrary cell tags?</title>
	<link>http://ask.metafilter.com/70627/Spreadsheets-that-do-arbitrary-cell-tags/</link>
	<description>Comments on Ask MetaFilter post Spreadsheets that do arbitrary cell tags?</description>
	<pubDate>Sun, 02 Sep 2007 11:12:13 -0800</pubDate>
	<lastBuildDate>Sun, 02 Sep 2007 11:12:13 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: Spreadsheets that do arbitrary cell tags?</title>
		<link>http://ask.metafilter.com/70627/Spreadsheets-that-do-arbitrary-cell-tags</link>	
		<description>Ignorant spreadsheet question: do most (or any) spreadsheets have the ability to tag cells with an arbitrary name or label and then do operations on only the cells with that tag? &lt;br /&gt;&lt;br /&gt; I want to write a formula that pulls its data from cells in a range that is not just discontinuous but what you might call shotgun-discontinuous; and to be able to append cells to or remove them from this shotgun-discontinuous range easily. Simple example: say I have a list of purchases for the year, with amounts, arranged sequentially by date from Jan 1 to Dec 30. Some of those purchases were related to, oh, a goat. Whenever I enter a new purchase for goat feed, goat clothing, goat education, goat cosmetics, goat vasectomy, etc. I&apos;d like to tag the amount as &quot;goat&quot; and at the end of the month or year just do =sum(goat). Can I do that?&lt;br&gt;
&lt;br&gt;
I&apos;m aware or Excel named cells but it looks as if I can&apos;t have more than one cell named &quot;goat&quot; in a given spreadsheet, so that&apos;s not the answer. I guess I could also enter the text string &quot;goat&quot; in the cell beside any pertaining-to-goat amount and when write an IF-formula (IF cell next to amount contains string &quot;goat&quot; THEN add amount to running total). But is there a cleaner way to do this? I really do hope to achieve the concision of =sum(goat). Possible? Thanks ever so!</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2007:site.70627</guid>
		<pubDate>Sun, 02 Sep 2007 10:24:15 -0800</pubDate>
		<dc:creator>jfuller</dc:creator>
		
			<category>spreadsheet</category>
		
			<category>tags</category>
		
			<category>goat</category>
		
	</item> <item>
		<title>By: adamrice</title>
		<link>http://ask.metafilter.com/70627/Spreadsheets-that-do-arbitrary-cell-tags#1053779</link>	
		<description>Yep, you want to look into &quot;sumif()&quot;. I used exactly this feature for a home budget where I categorized expenses and kept totals by category.&lt;br&gt;
&lt;br&gt;
I had one list consisting of line entries in the form of date/desc/cat/amt, and a second list for category subtotals in the form of cat name/subtotal. The &quot;subtotal&quot; cells were where the magic happened, and took the form&lt;br&gt;
&lt;br&gt;
=SUMIF(FirstAmountCell:LastAmountCell,CatNameCell,FirstCatCell:LastCatCell)&lt;br&gt;
&lt;br&gt;
In my case, it looked like this:&lt;br&gt;
=SUMIF($D$5:$D$200,$G4,$E$5:$E$200).&lt;br&gt;
&lt;br&gt;
There&apos;s probably an even more elegant way to do it, but this worked for me.&lt;br&gt;
&lt;br&gt;
I can send you a copy of my budget worksheet, if you want. Hit me up by e-mail.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.70627-1053779</guid>
		<pubDate>Sun, 02 Sep 2007 11:12:13 -0800</pubDate>
		<dc:creator>adamrice</dc:creator>
	</item><item>
		<title>By: Kwantsar</title>
		<link>http://ask.metafilter.com/70627/Spreadsheets-that-do-arbitrary-cell-tags#1053785</link>	
		<description>I think adamrice has it, but in terms of a &quot;cleaner way&quot; for future spreadsheet construction, I&apos;d suggest using dummy variables for categorical data. So if you have goats and sheep, for which you buy feed and veterinary services, you&apos;d create columns for those four things, and put a &quot;1&quot; in the relevant cells. That way you could do SUMIFs for all goat expenses, all food expenses, all goat food expenses, etc.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.70627-1053785</guid>
		<pubDate>Sun, 02 Sep 2007 11:44:53 -0800</pubDate>
		<dc:creator>Kwantsar</dc:creator>
	</item><item>
		<title>By: zixyer</title>
		<link>http://ask.metafilter.com/70627/Spreadsheets-that-do-arbitrary-cell-tags#1053800</link>	
		<description>I&apos;m not sure how having multiple columns for the different categories benefits you. Just use SUMIF with the appropriate criteria.&lt;br&gt;
&lt;br&gt;
&lt;code&gt;=sumif(D:D,&quot;goat&quot;,E:E)&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
Or&lt;br&gt;
&lt;br&gt;
&lt;code&gt;=sumif(D:D,&quot;food&quot;,E:E)&lt;/code&gt;</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.70627-1053800</guid>
		<pubDate>Sun, 02 Sep 2007 12:12:54 -0800</pubDate>
		<dc:creator>zixyer</dc:creator>
	</item><item>
		<title>By: Kwantsar</title>
		<link>http://ask.metafilter.com/70627/Spreadsheets-that-do-arbitrary-cell-tags#1053804</link>	
		<description>If the cell contains &lt;em&gt;goat food&lt;/em&gt;, and you want to look for all mentions of goat, you&apos;ll need to &lt;br&gt;
&lt;br&gt;
=sumif(D:D,&quot;*food*&quot;,E:E)&lt;br&gt;
&lt;br&gt;
 Which is one reason why dummy variables allow a cleaner construction.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.70627-1053804</guid>
		<pubDate>Sun, 02 Sep 2007 12:21:24 -0800</pubDate>
		<dc:creator>Kwantsar</dc:creator>
	</item><item>
		<title>By: Kwantsar</title>
		<link>http://ask.metafilter.com/70627/Spreadsheets-that-do-arbitrary-cell-tags#1053805</link>	
		<description>erm, replace &quot;*food*&quot; with &quot;*goat*&quot;.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.70627-1053805</guid>
		<pubDate>Sun, 02 Sep 2007 12:22:00 -0800</pubDate>
		<dc:creator>Kwantsar</dc:creator>
	</item><item>
		<title>By: zixyer</title>
		<link>http://ask.metafilter.com/70627/Spreadsheets-that-do-arbitrary-cell-tags#1053807</link>	
		<description>Or you could just do &lt;code&gt;=sumif(D:D,&quot;goat cosmetics&quot;,E:E)+sumif(D:D,&quot;goat food&quot;,E:E)&lt;/code&gt;. But you&apos;re right, if the data are more associated with a set of properties rather than neatly partitioned into categories, having a column for each property is better. The most important thing is to first think hard about how you organize your data.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.70627-1053807</guid>
		<pubDate>Sun, 02 Sep 2007 12:32:12 -0800</pubDate>
		<dc:creator>zixyer</dc:creator>
	</item><item>
		<title>By: hexatron</title>
		<link>http://ask.metafilter.com/70627/Spreadsheets-that-do-arbitrary-cell-tags#1053819</link>	
		<description>Excel  also has a bunch of &apos;database&apos; functions--DSUM() will do what you want much like SUMIF&lt;br&gt;
&lt;br&gt;
Or you might just bite the bullit and start using a database.&lt;br&gt;
&lt;br&gt;
But in any case, you really need a category column, as has been mentioned.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.70627-1053819</guid>
		<pubDate>Sun, 02 Sep 2007 13:05:54 -0800</pubDate>
		<dc:creator>hexatron</dc:creator>
	</item><item>
		<title>By: jfuller</title>
		<link>http://ask.metafilter.com/70627/Spreadsheets-that-do-arbitrary-cell-tags#1054096</link>	
		<description>Thanks very much to every one who responded, and thanks especially for the pointer to SUMIF. That&apos;s what I need.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;gt; The most important thing is to first think hard about how you organize your data.&lt;br&gt;
&lt;br&gt;
You mean I can&apos;t just jump in and start writing code before I know what it&apos;s supposed to do? Darn, what fun is that? (Some may suspect, correctly, that I learned BASIC first and then assembler, neither of which exactly forces an orderly approach to design.)&lt;br&gt;
&lt;br&gt;
Actually I believe I want two tags per amount, a coarse one (me, son, daughter, everybody) and a more fine-grained one (food, clothes, gas, etc.) Searching for howto pages with SUMIF examples, I found &lt;a href=&quot;http://www.mrexcel.com/tip083.shtml&quot;&gt;this page&lt;/a&gt; that revealed (to me, anyway) that excel actually has a wizard to help with this sort of thing; and the page also has a lovely precooked example involving exactly two columns of tags.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.70627-1054096</guid>
		<pubDate>Sun, 02 Sep 2007 20:16:10 -0800</pubDate>
		<dc:creator>jfuller</dc:creator>
	</item>
	</channel>
</rss>
