Hi,
I'm sure something similar has been asked in the past, but I'm having a hard time finding it.
What I have is a spreadsheet that I use for keeping track of income and expenses. The columns are weekly (Sat-Fri) and labeled with the date of the Friday (payday). So for this year I start with 01/07/2011, the next column is 01/14/2011, etc. I just keep adding 7 to the previous column and format as a date...
What I then want to do is to sum all of the rows by quarter. So I'm looking for a way to get the address of the first and last columns in a quarter. I currently am using:
=SUM(INDIRECT(ADDRESS(ROW(),2,,,"Weekly")&":"&ADDRESS(ROW(),24)))
But I'd like to get away from the "hard coded" columns (2 and 24 above - BTW: "Weekly" is the sheet with the weekly income/expenses). That way I won't have to tweak the formula each year, just designate a year and use that in a date calculation to determine which column is the start and which is the end of the quarter, date(YEAR,3,31) for the end of March.
I'm thinking there should be a way to say: find the first column where the date is > "end of quarter" and use that as start column for the range and something similar to get the "end" of the quarter.
Any suggestions?
Thanks,
Rob
Bookmarks