<?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: Excel: How to select a cell based on current month</title>
	<link>http://ask.metafilter.com/76918/Excel-How-to-select-a-cell-based-on-current-month/</link>
	<description>Comments on Ask MetaFilter post Excel: How to select a cell based on current month</description>
	<pubDate>Fri, 23 Nov 2007 10:10:43 -0800</pubDate>
	<lastBuildDate>Fri, 23 Nov 2007 10:10:43 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: Excel: How to select a cell based on current month</title>
		<link>http://ask.metafilter.com/76918/Excel-How-to-select-a-cell-based-on-current-month</link>	
		<description>Excel Filter: Selecting a cell/row based on current month. &lt;br /&gt;&lt;br /&gt; I&apos;m putting together a payment spreadsheet for a very small business, and I&apos;m piecing it together slowly. I&apos;m sure there are easier/elegant solutions abound, but this is what I have so far.&lt;br&gt;
&lt;br&gt;
In this example file:&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.buildinbranson.com/mefi/mefiExample.xls&quot;&gt;www.buildinbranson.com/mefi/mefiExample.xls&lt;/a&gt;&lt;br&gt;
or&lt;br&gt;
&lt;a href=&quot;http://www.buildinbranson.com/mefi/mefiExample.jpg&quot;&gt;(Screenshot if you can just work from that)&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
I have a column of dates and a column of current balance (Starting at A9 and B9). I want the Total Unit Due in cell C5 to look to the current month&apos;s balance.&lt;br&gt;
&lt;br&gt;
I&apos;ve played around with a formula to compare the current month to the month from column A*, and that works just fine. What I can&apos;t figure out is how to make it select the appropriate row.&lt;br&gt;
&lt;br&gt;
Sorry if this isn&apos;t overly clear, I&apos;ll try to clarify as needed. (Microsoft Excel 2007)</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2007:site.76918</guid>
		<pubDate>Fri, 23 Nov 2007 09:40:46 -0800</pubDate>
		<dc:creator>shinynewnick</dc:creator>
		
			<category>excel</category>
		
			<category>formula</category>
		
	</item> <item>
		<title>By: junesix</title>
		<link>http://ask.metafilter.com/76918/Excel-How-to-select-a-cell-based-on-current-month#1142886</link>	
		<description>You can use a DGET function.&lt;br&gt;
&lt;br&gt;
In A8 and E4, type in &quot;Month&quot;. In E5, input the following formula to generate the first day of the current month. &lt;br&gt;
&lt;br&gt;
=DATE(YEAR(TODAY()),MONTH(TODAY()),1) . &lt;br&gt;
&lt;br&gt;
In C5, input the following formula to retrieve the current balance in the corresponding month.&lt;br&gt;
&lt;br&gt;
=DGET(A9:B26,&quot;Current Balance&quot;,E4:E5)&lt;br&gt;
&lt;br&gt;
Now if you move A9:B26 to their own sheet (Sheet2) so that they start from row 1, you can replace A9:B26 with Sheet2!A:B and then the formula will work independent of any new rows you add.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.76918-1142886</guid>
		<pubDate>Fri, 23 Nov 2007 10:10:43 -0800</pubDate>
		<dc:creator>junesix</dc:creator>
	</item><item>
		<title>By: junesix</title>
		<link>http://ask.metafilter.com/76918/Excel-How-to-select-a-cell-based-on-current-month#1142892</link>	
		<description>BTW after you move A9:B26 to Sheet2 starting in row 1, your Total Unit Due formula in C5 should look like this:&lt;br&gt;
&lt;br&gt;
=DGET(Sheet2!A:B,&quot;Current Balance&quot;,E4:E5)&lt;br&gt;
&lt;br&gt;
What it&apos;s doing is looking in the A and B columns in Sheet2, focusing on the &quot;Current Balance&quot; column, and then matching it against the criteria in E4:E5 which is the first day of the current month.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.76918-1142892</guid>
		<pubDate>Fri, 23 Nov 2007 10:13:36 -0800</pubDate>
		<dc:creator>junesix</dc:creator>
	</item><item>
		<title>By: twiggy</title>
		<link>http://ask.metafilter.com/76918/Excel-How-to-select-a-cell-based-on-current-month#1142902</link>	
		<description>I&apos;m not familiar with DGET, but I tried junesix&apos;s example above so I didn&apos;t waste any time replying if the problem was already solved.  I might&apos;ve done something wrong, but it didn&apos;t work, so here&apos;s what I propose:&lt;br&gt;
&lt;br&gt;
Put &quot;Current Month&quot; in E4, and in E5, use junesix&apos;s formula for putting today&apos;s date/month:&lt;br&gt;
&lt;br&gt;
=DATE(YEAR(TODAY()),MONTH(TODAY()),1)&lt;br&gt;
&lt;br&gt;
This should end up being &quot;11/1/2007&quot; as of the time of this posting.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Next, use the LOOKUP function in C5:&lt;br&gt;
&lt;br&gt;
=LOOKUP(E5,A9:A25,B9:B25)&lt;br&gt;
&lt;br&gt;
This loks for what&apos;s in cell E5 within the range of cells A9:A25... and returns whatever is to the right of that in the range of B9:B25.  So, since $40 is to the right of 11/1/2007 - this returns $40.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.76918-1142902</guid>
		<pubDate>Fri, 23 Nov 2007 10:20:26 -0800</pubDate>
		<dc:creator>twiggy</dc:creator>
	</item><item>
		<title>By: shinynewnick</title>
		<link>http://ask.metafilter.com/76918/Excel-How-to-select-a-cell-based-on-current-month#1142910</link>	
		<description>Thanks so much, that worked perfectly, twiggy.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.76918-1142910</guid>
		<pubDate>Fri, 23 Nov 2007 10:32:18 -0800</pubDate>
		<dc:creator>shinynewnick</dc:creator>
	</item><item>
		<title>By: junesix</title>
		<link>http://ask.metafilter.com/76918/Excel-How-to-select-a-cell-based-on-current-month#1143477</link>	
		<description>Strange, it had worked in my sheet. Not sure what happened. In any case, glad you got a working solution.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.76918-1143477</guid>
		<pubDate>Fri, 23 Nov 2007 23:24:12 -0800</pubDate>
		<dc:creator>junesix</dc:creator>
	</item>
	</channel>
</rss>
