We help IT Professionals succeed at work.

Excel YTD Formula?

938 Views
Last Modified: 2018-11-02
Example.xlsxExample.xlsxI have a spreadsheet, attached, of my prior year monthly sales, and my current YTD monthly sales.

How do I write a formula (not an array or VBS please) to compare YTD totals through this month last year, compared to this month this year?

Thank you.
Comment
Watch Question

Rob HensonFinance Analyst
CERTIFIED EXPERT

Commented:
Can you upload a sample file?
Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013

Commented:
One option is to use sumifs in two locations, one for each month/year.  looks at a column of data where dates are stored in column A and amounts stored in column B.

=SUMIFS(B1:B56,A1:A56,">10/1/2017",A1:A56,"<10/31/2017")
Book1.xlsx

Author

Commented:
Sorry -- I thought I had uploaded the sample file. Here it is, attached/embedded. Thanks.

Author

Commented:
The dates have to be automatic, by the way ... meaning for 2017 the total has to be from 01/01/2017 through 11/2/2017 (a year ago today), and for 2018 the total has to be 01/01/2018  through 11/2/2018 (today).
CERTIFIED EXPERT

Commented:
as a start, some basic formula should able to manage this

(refer to attached and see if this is what you want?)
Example_b.xlsx
Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013

Commented:
Will all data be on one workbook in multiple sheets? Or are you trying to pull in data from multiple workbooks each with just one sheet of data?

Author

Commented:
Ryan: Thanks, but yours is a year-over-year comparison for each month. I need a YTD comparison for 2017 and 2018.  I also can't add additional helper columns to the spreadsheet.

Scott: All data will be on one worksheet. My example is a subset of data, but it will not be pulling data in from multiple workbooks. Thanks.
Rob HensonFinance Analyst
CERTIFIED EXPERT

Commented:
Maybe you should update your sample file with the results that you are expecting to see with explanations against each.
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Perfect. That's exactly what I needed, Ejgil!  Thank you.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.