+ Reply to Thread
Results 1 to 7 of 7

YTD Formulas

  1. #1
    Registered User
    Join Date
    05-29-2014
    Posts
    5

    YTD Formulas

    I'm trying to compare my YTD sales figures with sales figures from the past few years. I'm trying to use the SUMIF function as follows:
    =SUMIF(P$94:P$206,"<=" &TODAY()-1,S94:S206)
    Where column P is dates and column s is sales. That works peachy keen for the current year. But when I try to adjust it for previous years, like:
    =SUMIF(U$45:U$206,"DATE(YEAR(S209)-1,MONTH(S209),DAY(S209))",X45:X206)
    where column U is dates, x is sales figures, and s209 is a cell showing todays date, minus one I'm getting zeros. I'm thinking formatting error, but I doubled checked and everything is mm/dd/yy. . . .
    Maybe there's an easier way?

  2. #2
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: YTD Formulas

    What version of excel are you using?
    Please add reputation by clicking on the * if I have helped.
    Please mark the thread SOLVED if your issue has been resolved.
    Thanks, Glenn.

  3. #3
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: YTD Formulas

    First off, the way you have the double quotes isn't right. Try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    or if you're using 2007 or later
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    05-29-2014
    Posts
    5

    Re: YTD Formulas

    Excel for Mac 2011

  5. #5
    Registered User
    Join Date
    05-29-2014
    Posts
    5

    Re: YTD Formulas

    The second formula works for last year, can I adjust it to 24 months for the previous year?

  6. #6
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: YTD Formulas

    Ok, the EDATE function should work for you then.

  7. #7
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: YTD Formulas

    Yes you can. the second argument of the function is the number of months to offset from the date specified in the first argument. Positive numbers to move forward and negative numbers to move backwards.

+ 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. Using Cell references in file paths for formulas to create dynamic formulas
    By MichaelStokesJr in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-04-2013, 11:49 AM
  2. Replies: 5
    Last Post: 09-25-2013, 02:51 PM
  3. [SOLVED] VBA to enter various formulas every 10 rows and show dynamic formulas not values
    By faby2203 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-04-2013, 07:05 AM
  4. Ctrl+Shift+Enter (CSE) array formulas in VBA using differing formulas
    By officeguy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-11-2012, 04:31 PM
  5. Replies: 5
    Last Post: 05-05-2008, 02:22 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