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!


Last YearThis Year
January3445
February2136
March7245
April14521
May24
June36
July73
August51
September18
October12
November68
December99
TOTAL653147
Comparative272147

<tbody>
</tbody>
 

Some videos you may like

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
40,667
Office Version
365
Platform
Windows
Hi & welcome to MrExcel.
How about

<b>Excel 2013/2016</b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255,255,255);border: 1px solid;border-collapse: collapse; border-color: rgb(187,187,187)"><colgroup><col width="25px" style="background-color: rgb(218,231,245)" /><col /><col /><col /></colgroup><thead><tr style=" background-color: rgb(218,231,245);text-align: center;color: rgb(22,17,32)"><th></th><th>A</th><th>B</th><th>C</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">1</td><td style="text-align: right;;"></td><td style=";">Last Year</td><td style=";">This Year</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">2</td><td style=";">January</td><td style="text-align: right;;">34</td><td style="text-align: right;;">45</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">3</td><td style=";">February</td><td style="text-align: right;;">21</td><td style="text-align: right;;">36</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">4</td><td style=";">March</td><td style="text-align: right;;">72</td><td style="text-align: right;;">45</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">5</td><td style=";">April</td><td style="text-align: right;;">145</td><td style="text-align: right;;">21</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">6</td><td style=";">May</td><td style="text-align: right;;">24</td><td style=";"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">7</td><td style=";">June</td><td style="text-align: right;;">36</td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">8</td><td style=";">July</td><td style="text-align: right;;">73</td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">9</td><td style=";">August</td><td style="text-align: right;;">51</td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">10</td><td style=";">September</td><td style="text-align: right;;">18</td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">11</td><td style=";">October</td><td style="text-align: right;;">12</td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">12</td><td style=";">November</td><td style="text-align: right;;">68</td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">13</td><td style=";">December</td><td style="text-align: right;;">99</td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">14</td><td style=";">TOTAL</td><td style="text-align: right;;">653</td><td style="text-align: right;;">147</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">15</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">16</td><td style=";">Comparative</td><td style="text-align: right;;">272</td><td style="text-align: right;;">147</td></tr></tbody></table><p style="width:4.8em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">Report</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: rgb(255,255,255)" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">B16</th><td style="text-align:left">=SUMIF(<font color="Blue">C2:C13,">0",B2:B13</font>)</td></tr></tbody></table></td></tr></table><br />
 
Last edited:

Greg123

New Member
Joined
Apr 8, 2019
Messages
4
That was a little too obvious. Thanks, I should have figured that one out!



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

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Report

Worksheet Formulas
CellFormula
B16=SUMIF(C2:C13,">0",B2:B13)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
40,667
Office Version
365
Platform
Windows
You're welcome & thanks for the feedback.

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

Watch MrExcel Video

Forum statistics

Threads
1,099,063
Messages
5,466,369
Members
406,478
Latest member
Amar kumar

This Week's Hot Topics

Top