Avatar of Cactus1993
Cactus1993
Flag for United States of America asked on

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.
* XIRR FORMULASalesMicrosoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
Cactus1993

8/22/2022 - Mon
Rob Henson

Can you upload a sample file?
Scott Fell

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
Cactus1993

ASKER
Sorry -- I thought I had uploaded the sample file. Here it is, attached/embedded. Thanks.
Your help has saved me hundreds of hours of internet surfing.
fblack61
Cactus1993

ASKER
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 Chong

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 Fell

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?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Cactus1993

ASKER
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 Henson

Maybe you should update your sample file with the results that you are expecting to see with explanations against each.
ASKER CERTIFIED SOLUTION
Ejgil Hedegaard

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Cactus1993

ASKER
Perfect. That's exactly what I needed, Ejgil!  Thank you.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck