Calculating YTD Sales

Greg123

New Member
Joined
Apr 8, 2019
Messages
4
What is an easy way to calculate YTD sales for last year for the same months that have sales this year? In the example below, I want a formula that will determine that we are 4 months into this year, and only add the first 4 months of last year so that we have a YTD comparison. In this example, the 272 is what I am looking for but I don't want to have to update the formula each month. Any help is appreciated!


[TABLE="width: 275"]
<tbody>[TR]
[TD][/TD]
[TD]Last Year[/TD]
[TD]This Year[/TD]
[/TR]
[TR]
[TD]January[/TD]
[TD]34[/TD]
[TD]45[/TD]
[/TR]
[TR]
[TD]February[/TD]
[TD]21[/TD]
[TD]36[/TD]
[/TR]
[TR]
[TD]March[/TD]
[TD]72[/TD]
[TD]45[/TD]
[/TR]
[TR]
[TD]April[/TD]
[TD]145[/TD]
[TD]21[/TD]
[/TR]
[TR]
[TD]May[/TD]
[TD]24[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]June[/TD]
[TD]36[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]July[/TD]
[TD]73[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]August[/TD]
[TD]51[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]September[/TD]
[TD]18[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]October[/TD]
[TD]12[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]November[/TD]
[TD]68[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]December[/TD]
[TD]99[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TOTAL[/TD]
[TD]653[/TD]
[TD]147[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Comparative[/TD]
[TD]272[/TD]
[TD]147[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Hi & welcome to MrExcel.
How about


Excel 2013/2016
ABC
1Last YearThis Year
2January3445
3February2136
4March7245
5April14521
6May24
7June36
8July73
9August51
10September18
11October12
12November68
13December99
14TOTAL653147
15
16Comparative272147
Report
Cell Formulas
RangeFormula
B16=SUMIF(C2:C13,">0",B2:B13)
 
Last edited:
Upvote 0
That was a little too obvious. Thanks, I should have figured that one out!



Hi & welcome to MrExcel.
How about

Excel 2013/2016
ABC
Last YearThis Year
January
February
March
April
May
June
July
August
September
October
November
December
TOTAL
Comparative

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"][/TD]

[TD="align: center"]2[/TD]

[TD="align: right"]34[/TD]
[TD="align: right"]45[/TD]

[TD="align: center"]3[/TD]

[TD="align: right"]21[/TD]
[TD="align: right"]36[/TD]

[TD="align: center"]4[/TD]

[TD="align: right"]72[/TD]
[TD="align: right"]45[/TD]

[TD="align: center"]5[/TD]

[TD="align: right"]145[/TD]
[TD="align: right"]21[/TD]

[TD="align: center"]6[/TD]

[TD="align: right"]24[/TD]

[TD="align: center"]7[/TD]

[TD="align: right"]36[/TD]
[TD="align: right"][/TD]

[TD="align: center"]8[/TD]

[TD="align: right"]73[/TD]
[TD="align: right"][/TD]

[TD="align: center"]9[/TD]

[TD="align: right"]51[/TD]
[TD="align: right"][/TD]

[TD="align: center"]10[/TD]

[TD="align: right"]18[/TD]
[TD="align: right"][/TD]

[TD="align: center"]11[/TD]

[TD="align: right"]12[/TD]
[TD="align: right"][/TD]

[TD="align: center"]12[/TD]

[TD="align: right"]68[/TD]
[TD="align: right"][/TD]

[TD="align: center"]13[/TD]

[TD="align: right"]99[/TD]
[TD="align: right"][/TD]

[TD="align: center"]14[/TD]

[TD="align: right"]653[/TD]
[TD="align: right"]147[/TD]

[TD="align: center"]15[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]16[/TD]

[TD="align: right"]272[/TD]
[TD="align: right"]147[/TD]

</tbody>
Report

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B16[/TH]
[TD="align: left"]=SUMIF(C2:C13,">0",B2:B13)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
You're welcome & thanks for the feedback.

Unfortunately "The obvious" very rarely is (except with hindsight)
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,624
Latest member
gregg777

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top