+ Reply to Thread
Results 1 to 5 of 5

Sum values based on dates

  1. #1
    Registered User
    Join Date
    09-13-2012
    Location
    Utah, USA
    MS-Off Ver
    Excel 2007
    Posts
    35

    Sum values based on dates

    Have what is probably either really simple or completely impossible to do.
    I want to be able to dynamically adjust a value which is a product of values summed across column the length of which a based on a date value

    Here's the scenario
    Row 1 contains a 21 day date range starting on column B
    Rows 2-50 have a dollar amount that corresponds to Row 1. Together they show a the cost/day.

    Clear over on column AJ I have a date that changes based on a bunch of other formulas and calculations throughout the rest of the sheet.

    My hope is that I can have Excel calculate the sum of the dollar amount up to the date that shows up in column AJ

    For example:
    Row 1 10/12, 10/13, 10/14.....10/31
    Row 2 $100, $150, $130, $175.....$145

    Cell AO2 has the date 10/25
    I would like to sum the values on Row 2 from 10/12 (B2) to 10/25 only (P2).

    If the date in AO2 changes to 10/23 for example (due to the rest of the things going on in the spreadsheet), I'd like the values summed to go only to 10/23 (N2) and so on.

    I tried using SUMIF(B1:Y1,"<AJ2",B2:Y2) but it returns a 0.

    Any help/ideas would be very appreciated. If I can make this work it will make my life 1000x easier!

    Thanks in advance

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Sum values based on dates

    This will be easier to look at if you would attach a sample workbook.
    Make sure there is enough data to demonstrate your need but not so much that the file is too big (if you have 10,000 rows of data, you don't need to leave them all in, for example). Include before and after sheets in the workbook if needed to show the process you're trying to complete or automate. Make sure you include the answers you want to get - put examples in, with notes if necessary to explain details.
    Remember to remove any confidential information or, if a cell needs data in it to work, overwrite it with made-up data.
    The paperclip icon doesn't work at the moment, so click on Go Advanced under the reply box and then scroll down to Manage Attachments to attach a file.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Sum values based on dates

    you are so close but I think you need this SUMIF(B1:Y1,"<"&AJ2,B2:Y2) though AJ2 doesn't match your narrative saying you are referring to AO2.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Registered User
    Join Date
    09-13-2012
    Location
    Utah, USA
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: Sum values based on dates

    Sorry, typo on my part, the cell I need to reference for the date to calculate to is AJ2 not AO2.
    You NAILED IT though! I cannot thank you enough for the help!

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Sum values based on dates

    no problem, glad I could help.
    don't forget to mark your post as solved using the thread tools dropdown at the top of the post AND if you are so inclined adding reputation is always welcome.

+ 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. [SOLVED] Help using IF to return different values based on dates
    By 61dtl in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-16-2017, 11:16 AM
  2. Add and Subtract Values based on dates
    By headwest in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-18-2016, 08:01 AM
  3. Summing values based on their dates
    By Lyndo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-28-2015, 03:08 PM
  4. Replies: 12
    Last Post: 08-05-2015, 05:15 PM
  5. Replies: 0
    Last Post: 06-04-2014, 10:08 AM
  6. SUM values based on Multiple Dates
    By Caulerpa in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-16-2014, 09:32 PM
  7. sum values based on range of dates
    By mattvcommuter in forum Excel General
    Replies: 1
    Last Post: 01-18-2011, 02:45 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