+ Reply to Thread
Results 1 to 3 of 3

Thread: Sumifs

  1. #1
    Registered User
    Join Date
    02-11-2010
    Location
    Spokane WA, USA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Sumifs

    I have a simple formula for generating reports on a running sum. There are 4 fields
    CODE, DOLLARS, DESCRIPTION, DATE
    I have written the following formula to calculate the monthly totals for each CODE.

    =SUMIFS(dollars,refcodes,A2,RefDate,">=3/1/2009",RefDate,"<=3/31/2009")

    Where dollars, refcodes and refdate are named ranges.

    It works but this seems very awkward. Is there a way just to have one criteria that tests RefDate for the month like JAN09 or MAR09?

    thx
    Peter

  2. #2
    Forum Guru Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007
    Posts
    3,441

    Re: Sumifs

    I see nothing "awkward" about the formula. However, you might consider using a Pivot Table based on a dynamic named range for the source data.

    You could use an array formula:
    {=SUM(IF(MONTH(A2:A7)=1,B2:B7))}

    Where:
    Column-A holds dates
    Column-B holds values to sum
    "1" in the formula is the month (could be a cell reference to make it dynamic)

    Cells references in the above formula, obviously, can be named ranges as you already show.

    Note: Array formulas are committed using Ctrl+Shift+Enter key combination. Excel automatically adds the curly brackets.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,379

    Re: Sumifs

    similar question asked yesterday in regard to COUNTIFS (ie SUMIFS without the summation range) so the points hold true I'd say

    http://www.excelforum.com/excel-gene...light=COUNTIFS

    If your start date and end date ever equate to anything other than a full month then you will struggle to apply a single test based approach even in an Array / Sumproduct.

    I would still go further and say that even if you could get away with a single test the Array/Sumproduct would still be less efficient than the equivalent SUMIFS approach with the additional criteria test.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0