+ Reply to Thread
Results 1 to 6 of 6

sum based on criteria

  1. #1
    Registered User
    Join Date
    10-20-2010
    Location
    Chicago, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    69

    sum based on criteria

    Hi,

    I have attached an example spreadsheet. It's much easier to understand what im trying to do if you have the spreadsheet open. ex.xlsm

    so i have some values (val1.....val6) that i would like to sum for each month.

    row 2 - 8 sum values for jun12, row 10 - 16 sum values for jul12, row 18 - 24 sum values for aug12....i have more months listed on my actual sheet but i have only listed jun12, jul12, and aug12 for this example


    below row 25 are values from various months that are summed in row 2 - 8 for jun12, row 10 - 16 for jul12, row 18 - 24 aug12.


    i need a code or formula that will sum the values for jun12 (like the jun12 in B29, B36, B53) and populate them in appropriate cells above row 25...in the case of jun12 it should populate the sums in row 3-8. for example cell B3 is the sum of B29+B37+B53

    the data below row 25 could go on for any number of rows...so the code would need to be able to first check is there is any value in B60 for example, if there is text in B60 like "jul12" then it would need to sum all the jul12 values and populate them in rows 11-16...

    no matter how many rows there are below row 25, the format of the sheet would not change...what i mean by this is that all additional data would have spacing of one row like you have in row 33, 41, 49 etc..

    i would like this so that if my values below row 25 are changing in realtime the summed values above row 25 should also update realtime. please let me know if this is clear...thanks in advance

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: sum based on criteria

    With the sumproduct-formula

    Please Login or Register  to view this content.
    If you add headers a pivot table is also an option.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    10-20-2010
    Location
    Chicago, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    69

    Re: sum based on criteria

    hi oeldere,

    i thought i had headers...here is the spreadsheet with headers ex.xlsm ...could you please give an example of how a pivot table option would work? i am not familiar with using pivot tables..thanks
    Last edited by xelhelp; 06-03-2012 at 09:28 AM. Reason: wrong attachment

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: sum based on criteria

    For the example only the results voor -8, -7, -6, -5.

    Do you have questions, just ask.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-20-2010
    Location
    Chicago, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    69

    Re: sum based on criteria

    how do i get the sum for the remaining headers? -4,-3,-2,-1....8

    on the sheet labeled blad1 it shows the aggregate total for Jun12, jul12, and aug12....how do i view it by month...i.e. jun12 totals, jul12 totals and aug12 totals separately? I do like being able to check/uncheck boxes to indicate which one i want included or excluded from the totals...

    thanks

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: sum based on criteria

    For excel 2007:

    Pull (in the pivot table) the month in sigma value.

    If you want to see only one month, you only select the wanted month.

    Do you have questions, just ask.

+ Reply to Thread

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