+ Reply to Thread
Results 1 to 8 of 8

Search for fiscal quarter and year

  1. #1
    Registered User
    Join Date
    10-30-2008
    Location
    ma
    Posts
    35

    Search for fiscal quarter and year

    I have a spreadsheet that looks at outstanding quarterly data. The current column headings are:

    1 - Q4 2007 .... 11 - Q2 2010 12 - Q3 2010 13 - Q4 2010 14 - Q1 2011

    The column headings will change as each new quarter is entered, with the new quarter appended to the end, and all previous quarters with no outstanding data removed.

    The first column (which is J) will always be fixed, but the last column will depend on the numbers of quarters being shown.

    I need to enter a formula to determine all the quarters prior to the current year and quarter. for example, if I have Q4 in cell A1, and this is year 2010, I want to look up in my column headings where Q4 2010 is listed, (in this case it is the heading "13 - Q4 2010"), then sum all the columns from J up to, but not including that one.
    Last edited by joodkap; 05-21-2010 at 03:55 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Search for fiscal quarter and year

    Are the numbers (1, 2, ... 11, etc) in the headers too?

    Assuming they are not, and that you just are indicating to us the column numbers,

    then something like:

    =SUM(J2:INDEX(J2:N2,MATCH(A$1&" "&YEAR(TODAY()),$J$1:$N$1,0)-1))

    this will sum the values in row2 starting from J2 and ending 1 column before the indicated quarter in A1 and current year.

    formula can be copied down to get sums of next rows...

    See attached.
    Attached Files Attached Files
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    10-30-2008
    Location
    ma
    Posts
    35

    Re: Search for fiscal quarter and year

    The headings DO include the strings "1- ", "2 - " etc.

    The attached spreadsheet lists the actual headings.
    Note the formula in cell A2 is =SUM(J2:T2). what I'm trying to do is replace the hard-coded T2 with the cell reference of the quarter previous to the current quarter, shown in B1, taking the current year into consideration.

    In this example, the earliest 'Past Due' quarter is Q4 2007, so that is the data in cell J1. However, if that customer pays their bill, the next earliest Past Due quarter will become Q1 2009, and everything will move left accordingly, so the rightmost cell reference will change. (Col J will always be the first column in the range).

    Thanks.
    Attached Files Attached Files

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Search for fiscal quarter and year

    Try:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-30-2008
    Location
    ma
    Posts
    35

    Re: Search for fiscal quarter and year

    That's it!!!

    Thank you so much!

  6. #6
    Registered User
    Join Date
    10-30-2008
    Location
    ma
    Posts
    35

    Re: Search for fiscal quarter and year

    I had to modify the formula to return the correct fiscal year: January-May are always in the current fiscal year, and June-December are the next fiscal year.

    The following formula replaced YEAR(TODAY) with a LOOKUP referencing a Month/Year lookup table.

    =SUM($J89:INDEX($J89:$IV89,MATCH("*"&$D$88&" "&LOOKUP(MONTH(TODAY()),$B$140:$B$151,$C$140:$C$151),$J$88:$IV$88,0)-1))

    However, there seems to be a problem with the INDEX... -1, as the sum includes the current quarter, whereas the original formula summed to the prior quarter, which was what I wanted.

    Can you tell me what's wrong?
    Last edited by joodkap; 06-01-2010 at 09:51 AM.

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Search for fiscal quarter and year

    Are you sure the LOOKUP() function is returning the result you intended?

    Try the lookup on it's own to see what is returned.

    the -1 is just to offset the matched column back 1 to sum to previous month.

    If still an issue, post sample with issue.

  8. #8
    Registered User
    Join Date
    10-30-2008
    Location
    ma
    Posts
    35

    Re: Search for fiscal quarter and year

    Problem solved:

    Today is June 1, the first day of the new fiscal year, but I forgot to modify the current month from Q4 to Q1. It is correctly picking up the Q4 2010 data.

    I AM DUMB!!!
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1