+ Reply to Thread
Results 1 to 4 of 4

Perfom calculation based on date in range

  1. #1
    Registered User
    Join Date
    01-23-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    57

    Perfom calculation based on date in range

    I have been looking at this for hours and I'm sure there is an answer but I can't think of it right now.
    Various Index/Match tests are not giving me the answer I seek.

    I have a range of dates (the sunday of each week) across some columns (K->AC).
    To the left I have a dozen rows of tasks.
    Each task has 4 columns with hours (C->F) and 4 with dates (G->J).

    I am trying to make a formula that will look at each date (G->J) for the row, if the date (G->J) is between the current column's date (K->AC) then enter the corresponding summed hours (C->F) in the cell.

    I've attached an example file.

    Maybe I'm trying to do too much?
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,598

    Re: Perfom calculation based on date in range

    Put this formula in cell K10:

    =SUMIFS($C10:$F10,$G10:$J10,">="&K$8,$G10:$J10,"<"&K$8+7)

    then copy across and down as required.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    01-23-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Perfom calculation based on date in range

    Thank you @ Pete_UK! I was over thinking and over complicating it as always.

    I made one small change, I added an extra column with a date outside my expected range, and modified K$8+7 to L$9, just in case one of the dates ends up being changed to some oddball one that is not a Sunday (maybe due to a holiday or something).

    Final formula in cell K10 is:

    =SUMIFS($C10:$F10,$G10:$J10,">="&K$8,$G10:$J10,"<"&L$8)
    Last edited by witchcraftz; 05-21-2019 at 11:23 AM.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,333

    Re: Perfom calculation based on date in range

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. Net Present Value Calculation based on Date Range
    By anjoseph9626 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-20-2013, 05:43 PM
  2. Replies: 4
    Last Post: 06-02-2012, 11:26 AM
  3. Replies: 3
    Last Post: 04-04-2012, 03:42 PM
  4. [SOLVED] How do I perfom a character count in a single cell in Excel?
    By RonNette72791 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 08-11-2006, 12:55 PM
  5. [SOLVED] Date Range Calculation
    By KC in forum Excel General
    Replies: 5
    Last Post: 07-31-2006, 06:13 PM
  6. [SOLVED] Calculation based on date
    By Jack in forum Excel General
    Replies: 3
    Last Post: 03-22-2006, 04:20 AM
  7. [SOLVED] Calculation based with Range of Date
    By Rao Ratan Singh in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 01-24-2006, 05:10 AM
  8. Date Range and calculation
    By vgreen in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 09-06-2005, 07:05 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