+ Reply to Thread
Results 1 to 6 of 6

Date Range

  1. #1
    Registered User
    Join Date
    02-17-2008
    Posts
    51

    Date Range

    Hey guys,

    I need your help! I have two tables: the 1st table consists of date range (From and To) and week number while the other table has only dates.

    Example:
    1st Table
    FROM TO WK
    3/27/2009 4/2/2009 14
    4/3/2009 4/9/2009 15
    4/10/2009 4/16/2009 16
    4/17/2009 4/23/2009 17
    4/24/2009 4/30/2009 18

    2nd Table
    DATE
    03/28/2009
    04/11/2009
    04/26/2009

    Could you please provide me a simple formula that would show a wk number in the 2nd table (2nd column)? I.e 03/28/2009 has wk no. 14, etc.

    I wanted to code this but there is simple formula, I would go this way.

    Your help on this is appreciated!
    Last edited by Statsman; 05-06-2009 at 11:53 AM. Reason: ISsue solved

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    re: Date Range

    Assuming dates are in col A and B and Wk is in column C

    =SUMPRODUCT((Table2!A1>=Table1!$A$1:$A$5)*(Table2!A7<=Table1!$B$1:$B$5),Table1!$C$1:$C$5)
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    re: Date Range

    Try:

    =LOOKUP(F1,$A$1:$C$5)

    where F1 contains date to look up and A1:C5 contains table...
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    re: Date Range

    and this?

    =INT((G21-39814)/7)+1

    where 39814 is for 1.1.2009

  5. #5
    Registered User
    Join Date
    02-17-2008
    Posts
    51

    Re: Date Range

    Thanks everyone but the sumproduct works great!

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Date Range

    You did ask for a simple formula...and sumproduct is not the simplist.

+ 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