Member_2_2496814_1

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.

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.

Can you upload a sample file?

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

=SUMIFS(B1:B56,A1:A56,">10

Book1.xlsx

ASKER

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

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).

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

(refer to attached and see if this is what you want?)

Example_b.xlsx

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?

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.

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.

Maybe you should update your sample file with the results that you are expecting to see with explanations against each.

ASKER CERTIFIED SOLUTION

membership

This solution is only available to members.

To access this solution, you must be a member of Experts Exchange.

ASKER

Perfect. That's exactly what I needed, Ejgil! Thank you.