+ Reply to Thread
Results 1 to 4 of 4

Matching Dates & Summing

  1. #1
    Forum Contributor
    Join Date
    02-10-2007
    MS-Off Ver
    Excel 2010
    Posts
    293

    Matching Dates & Summing

    Hi,

    In tab A, I have date range
    In tab B, I have weeks with a calendar

    Tab C - Expected result.

    What I'm trying to do is match up the date ranges from tab A with the "Weeks" in Tab B based on calendar, and end result should be to find the sum on tab c (column B)...explanation in column d for reference...please see attached file

    How can this be done?

    Thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Matching Dates & Summing

    I would add a helper column in sheet A with a formula to show the week number (let's say this is in column C):

    C2 =WEEKNUM(A2,21)

    Then, you can use a SUMIF formula on sheet C:

    B2 =SUMIF(A!C:C,A2,A!B:B)

  3. #3
    Forum Contributor
    Join Date
    02-10-2007
    MS-Off Ver
    Excel 2010
    Posts
    293

    Re: Matching Dates & Summing

    thanks 63falcondude, this seemed to have worked. what does it mean or why did you use 21, in formula c2=weeknum(a2,21)

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Matching Dates & Summing

    You're welcome.

    The second part of the WEEKNUM function is the return type. The return type controls which day of the week is used to begin a new week number.

    The return types of 2 and 21 are both used for Monday. We used 21 here since you don't want Jan 1st to be week 1 (according to sheet B).

    More on WEEKNUM here: https://support.office.com/en-us/art...1-b18c13c75340

    If that solved your question, please mark this thread as SOLVED.

+ 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. Matching and Summing help
    By 04zhp in forum Excel General
    Replies: 3
    Last Post: 01-09-2017, 03:14 PM
  2. [SOLVED] MATCHING multiple values and SUMMING
    By InterstateRentals in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-08-2014, 03:55 PM
  3. Replies: 10
    Last Post: 09-04-2013, 08:34 PM
  4. Summing based on 2 criteria matching
    By highlystrung in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-16-2013, 01:37 AM
  5. Matching categories and Summing
    By Pasha81 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-10-2009, 01:52 PM
  6. Summing of Matching Values for condition
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-10-2009, 05:48 PM
  7. Matching a Year and then Summing the totals
    By Anice in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-23-2006, 09:30 AM

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