+ Reply to Thread
Results 1 to 7 of 7

Need a formula that will sum the value of dollars within a given date range

  1. #1
    Registered User
    Join Date
    11-14-2017
    Location
    Houston, Texas
    MS-Off Ver
    Office 2016
    Posts
    8

    Need a formula that will sum the value of dollars within a given date range

    Hi,

    In the attached Excel file, I've created a dummy example of my master data.

    Each ID is a location. At each location, there is a dollar amount for each date. For this exercise, I already know the first and last dates in columns H and I. Using those dates, I'd like to return in column J the sum value of the dollar amounts in the known date range. Is this possible?

    Thank you in advance.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Need a formula that will sum the value of dollars within a given date range

    Try this.

    Please Login or Register  to view this content.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Need a formula that will sum the value of dollars within a given date range

    In J2 =SUMIFS(B2:G2,$B$1:$G$1,">=" &H2,$B$1:$G$1,"<=" &I2) and copy down
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    11-14-2017
    Location
    Houston, Texas
    MS-Off Ver
    Office 2016
    Posts
    8

    Re: Need a formula that will sum the value of dollars within a given date range

    Both of these solutions worked perfectly in my sample file, but when I tried to implement them into the main file the calculation returned a value of zero, which isn't correct. I can't seem to figure out what I'm missing. In the main file, the date range is in columns C through S, and the first/last dates are entered in columns T and U. This is what I updated the formula to when I put it into my master data sheet:

    =SUMPRODUCT(($C$1:$S$1>=T2)*($C$1:$S$1<=U2)*(C2:S2))

    And this is the other option:

    =SUMIFS(C2:S2,$C$1:$S$1,">=" &T2,$C$1:$S$1,"<=" &U2)

    Both are returning a sum of "$0.00" in my results column V for some reason.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Need a formula that will sum the value of dollars within a given date range

    a few things to check...
    1. Are your dates real dates or text looking like dates?
    2. are the values you need to sum, really numbers or text looking like numbers?

    for both of these, test with =isnumber (cell-ref) FALSE indicates text and we will need to convert them

    Where is the data coming from? If it is being imported, it is probably being imported as text
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Registered User
    Join Date
    11-14-2017
    Location
    Houston, Texas
    MS-Off Ver
    Office 2016
    Posts
    8

    Re: Need a formula that will sum the value of dollars within a given date range

    Yep, that was it! The dates were stored as text, after I converted them to values it was no problem. Both of these formulas worked for me, thank you!

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Need a formula that will sum the value of dollars within a given date range

    Fairly common problem. Happy to help

+ 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] date column changes to dollars
    By MarvLL in forum Excel General
    Replies: 4
    Last Post: 01-26-2018, 12:05 AM
  2. Replies: 0
    Last Post: 11-07-2017, 07:51 PM
  3. Sumif dollars from certain date range
    By kiwi98 in forum Excel General
    Replies: 11
    Last Post: 10-13-2011, 06:41 PM
  4. how do I chart date Vs dollars
    By adrian078 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 12-08-2007, 08:04 AM
  5. [SOLVED] write macro col A date Col B gas col C dollars
    By Macro Help in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 12-30-2005, 04:50 PM
  6. [SOLVED] I wish to make a formula that adds dollars in 1 column if a date .
    By Wayne Cameron in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-21-2005, 03:05 PM
  7. [SOLVED] converting #dollars into word dollars?
    By hotrodenford in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-07-2005, 03:06 AM

Tags for this Thread

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