Excel YTD Formula?

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.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rob HensonFinance AnalystCommented:
Can you upload a sample file?
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
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.

Cactus1993Author Commented:
Sorry -- I thought I had uploaded the sample file. Here it is, attached/embedded. Thanks.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Cactus1993Author 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).
Ryan ChongSoftware Team Lead, ex-Business Systems Analyst , ex-Senior Application EngineerCommented:
as a start, some basic formula should able to manage this

(refer to attached and see if this is what you want?)
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
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?
Cactus1993Author 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 AnalystCommented:
Maybe you should update your sample file with the results that you are expecting to see with explanations against each.
Ejgil HedegaardCommented:
In attached file, the months for 2018 (A14:A25) are changed to dates like 2017.
Then YTD can be calculated with this formula in F2

Open in new window

Last month in E2 is also found with a formula, so the values will update when you add the value for October in B23.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cactus1993Author Commented:
Perfect. That's exactly what I needed, Ejgil!  Thank you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.