+ Reply to Thread
Results 1 to 9 of 9

Trying to sum items due per week, with variable number of items/day and some days repeated

  1. #1
    Registered User
    Join Date
    05-28-2013
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Trying to sum items due per week, with variable number of items/day and some days repeated

    I have a spreadsheet showing package due-dates (Sheet1, col. A) and then the number of items in each package (Sheet1, col. B). I would like to sum for each week on Sheet2 the total number of items due that week. For example, if for the week of 8-Jul-2013 there are three packages due on 9-July-2013, 9-July-2013, and 12-July-2013, with 3,4, and 8 items respectively, then I'd want Sheet2 Column B to show that there are 15 total items due in that week.

    I at first thought to try vlookup, but I am not sure how to use that with possible multiple returns, and also a range of dates (any date in the specified week) rather than a fixed value. I have also looked at array formulas but I am out to sea on how I would adapt what I found on Google to account for the variable date range.

    Example.xls
    Last edited by CJEGray; 06-21-2013 at 05:08 PM. Reason: to clarify example

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Trying to sum items due per week, with variable number of items/day and some days repe

    Can you just use sum if ?

    =SUMIF(Sheet1!$A$2:$A$217,Sheet2!A2,Sheet1!$B$1:$B$217) and drag it down

  3. #3
    Registered User
    Join Date
    05-28-2013
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Trying to sum items due per week, with variable number of items/day and some days repe

    Wow, thanks for getting to my question so quickly!

    I pasted in that formula but it seemed to be returning too few items per week. I looked up SUMIF on google and it seems that with that formula it would only return items due specifically on the cell in Sheet2!A:. However, Sheet2!A only shows the date of the first day in the week. I attempted to modify the formula as follows but it doesn't seem to be working right (I'm not sure if it's just a syntax problem as I'm still learning the exact syntaxes for Excel, or if this is beyond the ability of the function itself):

    Please Login or Register  to view this content.

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

    Re: Trying to sum items due per week, with variable number of items/day and some days repe

    See the attached file.

    I used an public function to determine the week.

    I also added the month and year.

    After that I made an pivot table.

    Notice: if there is an addition in the data-cell you get an failure (you also see this failure in the pivot table).
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Registered User
    Join Date
    05-28-2013
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Trying to sum items due per week, with variable number of items/day and some days repe

    Thank you! This solves my problem.

  6. #6
    Registered User
    Join Date
    06-10-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Trying to sum items due per week, with variable number of items/day and some days repe

    Here's another solution that doesn't need pivot tables.

    Just need to add a column to each sheet and use SUMIF.
    Attached Files Attached Files

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

    Re: Trying to sum items due per week, with variable number of items/day and some days repe

    Please Login or Register  to view this content.
    Always good to add to whom your responding.

    You got several solutions, so which one solved your problem.

  8. #8
    Registered User
    Join Date
    05-28-2013
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Trying to sum items due per week, with variable number of items/day and some days repe

    Quote Originally Posted by oeldere View Post
    Always good to add to whom your responding.

    You got several solutions, so which one solved your problem.
    Oops, sorry. When I posted that reply I had only seen yours, but I guess my post took a few minutes to go through. Both solutions work for my problem, however, so thank you both.

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

    Re: Trying to sum items due per week, with variable number of items/day and some days repe

    Thanks for the reply.

    Glad I could help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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