+ Reply to Thread
Results 1 to 8 of 8

ytd calculation returns error please help

  1. #1
    Registered User
    Join Date
    01-23-2020
    Location
    edmonton, alberta
    MS-Off Ver
    2016 professional plus
    Posts
    4

    Exclamation ytd calculation returns error please help

    Hey there,

    I am trying to get the running year to date sum of the values in row 5 if todays date is less than or equal to that month so then to include that corresponding months value into the equation and give us a running total ytd sum

    =SUMIF($C$1,"<="&Months, Money_In)

    This is formula I'm using. C1 is todays date, less than or equal to the reference group of Months (jan-dec, w/ the year etc but calculated as the last day of the month (its true value) using eomonth) should then output the sum of the corresponding money in columns values

    Your help on this is greatly appreciated, Thanks!

    -Austin
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    49,804

    Re: ytd calculation returns error please help

    Todays date is going to be less than every date in row 5 (so far)?

    what would your expected answer be?
    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

  3. #3
    Registered User
    Join Date
    01-23-2020
    Location
    edmonton, alberta
    MS-Off Ver
    2016 professional plus
    Posts
    4

    Re: ytd calculation returns error please help

    Right so the answer should be 0 at the moment and if we play with the date so say be yesterday for January instead of the 31st then it should be $1,000 instead of #value and then after month 2 it would hopefully be $3000 cuz it sums the two together since the

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    49,804

    Re: ytd calculation returns error please help

    try this...
    =SUMIF($D$4:$S$4,"<="&$C$1,D5:S5)

  5. #5
    Registered User
    Join Date
    01-23-2020
    Location
    edmonton, alberta
    MS-Off Ver
    2016 professional plus
    Posts
    4

    Re: ytd calculation returns error please help

    Closer, thanks. That gets me zero but when i add +10 to todays date in reference c1, that date should then be greater than it and the 0 value in the formula would add the $1000 dollar value below and be $1000 instead of zero or 43863

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    49,804

    Re: ytd calculation returns error please help

    When I add 10 to your C1, I get 1000
    When I add 40 to your C1, I get 3000

    Im not sure what you are asking now?

  7. #7
    Registered User
    Join Date
    01-23-2020
    Location
    edmonton, alberta
    MS-Off Ver
    2016 professional plus
    Posts
    4

    Re: ytd calculation returns error please help

    Idk why it didn't work for me last time, sorry, it worked that time! Thank you so much, really appreciated!

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    49,804

    Re: ytd calculation returns error please help

    No problem, Im happy to have helped

+ 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. Variable issue: Calculation returns 0, which type to use?
    By RobSteward in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-20-2017, 12:00 PM
  2. [SOLVED] Trend Calculation - Returns symbol
    By Shanethompson in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-21-2017, 08:11 AM
  3. DAX calculation returns empty
    By baronng in forum Office 365
    Replies: 0
    Last Post: 09-19-2013, 03:13 AM
  4. [SOLVED] if formula returns a zero value, do another calculation
    By petelomax in forum Excel General
    Replies: 2
    Last Post: 05-01-2012, 04:53 AM
  5. Replies: 1
    Last Post: 03-28-2012, 10:33 AM
  6. returns calculation using sumproduct
    By Stan Altshuller in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-12-2005, 09:06 PM

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