+ Reply to Thread
Results 1 to 3 of 3

Conditional Range sum formula

  1. #1
    Registered User
    Join Date
    01-10-2014
    Location
    Brazil
    MS-Off Ver
    Excel 2007
    Posts
    1

    Question Conditional Range sum formula

    Hi,

    I am trying to create a conditional sum.

    My data is as the example bellow (but with a much large data, 350.000 lines)


    aa.JPG



    A B C

    1 Year Month Value
    2 2014 03 5
    3 2014 02 5
    4 2014 01 3
    5 2013 12 4
    6 2013 11 8
    7 2013 01 2
    8 2012 10 5
    9 2012 09 7
    10 2011 12 6
    11 2011 01 4



    What I need is to add the values for the dates in the range of 2012/10 and 2014/02 (including those months), so the total would be 27.

    I’ve tried sumif and sum(if()), but couldn’t do it, hope someone could help me.

    My data have more columns as well, but with much easier criteria to filter (sumifs solves it easially), my problem is filtering this conditioning with the conditional range.
    Last edited by thales_cnm; 01-10-2014 at 06:04 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,047

    Re: Conditional Range sum formula

    Hi and welcome to the forum

    (sumifs solves it easially), my problem is filtering this conditioning with the conditional range.
    what do you meant by filtering on a conditional range?

    Also, dates are almosr always easier to work with if you use actual dates, instead of the year in 1 cell, the month in another etc. I would combine those "dates" to become real dates...=DATE(A2,B2,1)

    A
    B
    C
    D
    E
    1
    Year Month Value
    2
    2014
    3
    5
    3/1/2014
    27
    3
    2014
    2
    5
    2/1/2014
    4
    2014
    1
    3
    1/1/2014
    5
    2013
    12
    4
    12/1/2013
    6
    2013
    11
    8
    11/1/2013
    7
    2013
    1
    2
    1/1/2013
    8
    2012
    10
    5
    10/1/2012
    9
    2012
    9
    7
    9/1/2012
    10
    2011
    12
    6
    12/1/2011
    11
    2011
    1
    4
    1/1/2011


    E2=SUMIFS($C$2:$C$11,$D$2:$D$11,">="&DATE(2012,10,1),$D$2:$D$11,"<="&DATE(2014,2,1))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Conditional Range sum formula

    paste this formula into D2 and fill down

    Please Login or Register  to view this content.

+ 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. Conditional formatting formula -Data range?
    By elfiky in forum Excel General
    Replies: 2
    Last Post: 09-27-2011, 02:44 AM
  2. use of named range to specify conditions for conditional formula
    By sderidder in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-28-2011, 06:47 PM
  3. highlight comparison using conditional formatting with formula in range
    By tjc0ol in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-29-2011, 08:48 AM
  4. Help with date range conditional formula
    By DMBerger in forum Excel General
    Replies: 2
    Last Post: 05-07-2009, 11:30 AM
  5. Replies: 8
    Last Post: 07-12-2006, 06:55 PM

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.6.0 RC 1