Excel: How to select a cell based on current month
November 23, 2007 9:40 AM
Subscribe
Excel Filter: Selecting a cell/row based on current month.
I'm putting together a payment spreadsheet for a very small business, and I'm piecing it together slowly. I'm sure there are easier/elegant solutions abound, but this is what I have so far.
In this example file:
www.buildinbranson.com/mefi/mefiExample.xls
or
(Screenshot if you can just work from that)
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's balance.
I'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't figure out is how to make it select the appropriate row.
Sorry if this isn't overly clear, I'll try to clarify as needed. (Microsoft Excel 2007)
posted by shinynewnick to computers & internet (5 comments total)
1 user marked this as a favorite
In A8 and E4, type in "Month". In E5, input the following formula to generate the first day of the current month.
=DATE(YEAR(TODAY()),MONTH(TODAY()),1) .
In C5, input the following formula to retrieve the current balance in the corresponding month.
=DGET(A9:B26,"Current Balance",E4:E5)
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.
posted by junesix at 10:10 AM on November 23, 2007