+ Reply to Thread
Results 1 to 4 of 4

summing data that meets certain conditions

  1. #1
    Registered User
    Join Date
    04-25-2014
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    2

    summing data that meets certain conditions

    Hello all. I am having trouble coming up with a formula to fit this problem. Any suggestions would be appreciated. Here is my data

    A B C D

    A 2019-01-01 $10
    A 2019-12-31 $10 $30 (sum of cell C2, C3 and C4)
    A 2019-12-31 $10 $30 (sum of cell C2, C3 and C4)
    A 2019-12-31 $10 $30 (sum of cell C2, C3 and C4)
    B 2019-12-31 $10 $20 (sum of cell C5 and C6)
    B 2019-12-31 $10 $20 (sum of cell C5 and C6)
    C 2019-12-31 $10 $40 (sum of cell C7 C8 C9 and C10)
    C 2019-12-31 $10 $40 (sum of cell C7 C8 C9 and C10)
    C 2019-12-31 $10 $40 (sum of cell C7 C8 C9 and C10)
    C 2019-12-31 $10 $40 (sum of cell C7 C8 C9 and C10)


    I want to find a formula to put in column D such that it gives the sum of column C subject to the following conditions
    1) the value of the date in column B is 2019-12-31
    2) sum only the cells of column C where the same row's value for column A is the same as the column A value for the row the formula is in

    I've shown in column D what the values of this hypothetically formula should be if it's working right.

    Thank you for any insights you have!

  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
    52,944

    Re: summing data that meets certain conditions

    Hi, welcome to teh forum

    You seem to have left out the 1/1/2019 item?

    Anyway, this should give you what you want...
    D2=SUMIFS($C$2:$C$11,$A$2:$A$11,A2,$B$2:$B$11,B2)
    copied down
    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
    Registered User
    Join Date
    04-25-2014
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: summing data that meets certain conditions

    Thanks for your reply!

    I did not forget the 1/1/2019 item, that one doesn't meet the first criteria (1) the value of the date in column B is 2019-12-31, so should be excluded

    Your suggestion does work, however I was hoping for something more generalizable that I could drag down (my real data set has about 2000 unique values in column A so would be difficult to use this type of formula)

  4. #4
    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
    52,944

    Re: summing data that meets certain conditions

    That formula will work no matter how long your data is - you just need to adjust the tange as needed
    Or even use this...
    =SUMIFS($C:$C,$A:$A,A2,$B:$B,B2)

+ 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. returning a value if it meets conditions
    By newtoexcelhelpme in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-20-2019, 11:35 AM
  2. Display data that meets certain conditions
    By michael.adams2 in forum Excel General
    Replies: 1
    Last Post: 12-16-2015, 04:27 PM
  3. [SOLVED] Trying to calculate a quartile of a data set that meets certain conditions
    By harrydnyc in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-16-2015, 01:25 AM
  4. Extracting unique data that meets specific conditions
    By tekobayashi in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-07-2013, 08:44 AM
  5. Delete row that meets conditions and the one below
    By Turbobiker in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-26-2009, 05:06 AM
  6. Summing data that meets two conditions
    By tempoteam in forum Excel General
    Replies: 5
    Last Post: 06-02-2009, 06:22 AM
  7. [SOLVED] sum column when it meets certain conditions
    By jimswinder in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-21-2006, 01:45 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