+ Reply to Thread
Results 1 to 8 of 8

Good lookups for quarters, year, and year to date

  1. #1
    Forum Contributor
    Join Date
    12-12-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    448

    Good lookups for quarters, year, and year to date

    Hello. I've attached a spreadsheet with some line items and dates (by month, quarter, and year). I would like to create a lookup that returns the quarterly numbers (for each year) the yearly numbers, AND the year to date numbers (so, if I wrote August 2011, it would give me the results YTD through August for JUST 2011). I'm open to various ways of doing this, as it helps me learn. Danks.
    Attached Files Attached Files

  2. #2
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Good lookups for quarters, year, and year to date

    Book1.xlsx
    Please see attached
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  3. #3
    Forum Contributor
    Join Date
    12-12-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    448

    Re: Good lookups for quarters, year, and year to date

    Why does this have to be an array? It seems like there could be something simpler.

  4. #4
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Good lookups for quarters, year, and year to date

    =SUMPRODUCT(--(Data!$A$5:$A$13=Sheet2!$A$3)*(Data!$B$1:$Y$1=Sheet2!B2),Data!$B$5:$Y$13)

    =SUMPRODUCT((Data!$A$5:$A$13=Sheet2!$A$3)*(Data!$B$2:$Y$2=Sheet2!C2)*(Data!$B$1:$Y$1=Sheet2!B2),Data!$B$5:$Y$13)

    =SUMPRODUCT((Data!$A$5:$A$13=Sheet2!$A$3)*(Data!$B$3:$Y$3<=Sheet2!D2),Data!$B$5:$Y$13)

  5. #5
    Forum Contributor
    Join Date
    12-12-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    448

    Re: Good lookups for quarters, year, and year to date

    The first two formulas work, but the third doesn't. I want the YTD numbers for 2011, so this would be just January and February of 2011. Also, can you explain what the formulas are doing? Thanks.

  6. #6
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Good lookups for quarters, year, and year to date

    =SUMPRODUCT((Data!$A$5:$A$13=Sheet2!$A$3)*(YEAR(Data!$B$3:$Y$3)=YEAR(Sheet2!D2))*(MONTH(Data!$B$3:$Y$3)<=MONTH(Sheet2!D2)),Data!$B$5:$Y$13)

  7. #7
    Forum Contributor
    Join Date
    12-12-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    448

    Re: Good lookups for quarters, year, and year to date

    These sumproducts work, but couldn't I just use a sum if here? Wouldn't that be easier? Also, what if the table in the "data" tab expands. Instead of B5:Y13, should I extend the number of rows, in case more rows are added?
    Last edited by amartino44; 09-06-2013 at 01:20 PM.

  8. #8
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Good lookups for quarters, year, and year to date

    I can be done but with two extra function son the top.Is better to use SUMPRODUCT or SUM(IF)) if both: horizontal and vertical ranges are calculated.
    Yes you need to expand all ranges to cover more rows/columns.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 09-04-2013, 10:49 AM
  2. Transpose Quarters from Calendar Year to Fiscal Year
    By jodiander in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-25-2013, 01:00 PM
  3. Replies: 0
    Last Post: 11-28-2007, 07:00 AM
  4. how do I convert a dates in a year quarters in a year?
    By Linndek in forum Excel General
    Replies: 5
    Last Post: 05-11-2006, 10:35 AM
  5. Group date into Year and Quarters
    By Ctech in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-11-2005, 05:05 PM

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