Year to Date Totals - Automatic formula adjusting

rgillson3

Board Regular
Joined
Oct 3, 2013
Messages
62
I've got a spreadsheet containing customer counts for each period of various years.

As part of our periodic review process, we look at the year to date counts for a given period, compared to the same time frame for previous years.

Currently, I adjust nine rows to include only the desired periods. This is done for six different revenue centers.

Is there a way to have the spreadsheet auto-adjust the formula for previous years, based on whether or not there is data for the current year.

Let's say periods are in columns A thru M (13 periods).

Period 10 is in column J, and the current year is in row 16.

I'd like row 15 to automatically sum columns A thru J.

Then, when period 11 in column K is populated, I'd want the previous years to adjust to also include column K, and so on.
 

jorismoerings

Well-known Member
Joined
Jul 4, 2014
Messages
1,263
Hi,

Two options, try which one works best for you.

<b></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 /><col /><col /><col /><col /><col /><col /><col /><col /><col /><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><th>D</th><th>E</th><th>F</th><th>G</th><th>H</th><th>I</th><th>J</th><th>K</th><th>L</th><th>M</th><th>N</th><th>O</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">12</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></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;">13</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></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;">14</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;">165</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">15</td><td style="text-align: right;;">10</td><td style="text-align: right;;">11</td><td style="text-align: right;;">12</td><td style="text-align: right;;">13</td><td style="text-align: right;;">14</td><td style="text-align: right;;">15</td><td style="text-align: right;;">16</td><td style="text-align: right;;">17</td><td style="text-align: right;;">18</td><td style="text-align: right;;">19</td><td style="text-align: right;;">20</td><td style="text-align: right;;">21</td><td style="text-align: right;;">22</td><td style="text-align: right;;"></td><td style="text-align: right;;">165</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">16</td><td style="text-align: right;;">10</td><td style="text-align: right;;">10</td><td style="text-align: right;;">10</td><td style="text-align: right;;">10</td><td style="text-align: right;;">10</td><td style="text-align: right;;">10</td><td style="text-align: right;;">10</td><td style="text-align: right;;">10</td><td style="text-align: right;;">10</td><td style="text-align: right;;">10</td><td style="text-align: right;;">10</td><td style="text-align: right;;"></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;">17</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr></tbody></table><p style="width:3,6em;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)">Sheet1</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)">O14</th><td style="text-align:left">=SUM(<font color="Blue">OFFSET(<font color="Red">A15,0,0,1,13-COUNTBLANK(<font color="Green">A16:M16</font>)</font>)</font>)</td></tr><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">O15</th><td style="text-align:left">=SUMIFS(<font color="Blue">A15:M15,A16:M16,"<>"&""</font>)</td></tr></tbody></table></td></tr></table><br />
 

rgillson3

Board Regular
Joined
Oct 3, 2013
Messages
62
Thank you.

At a glance, I think either of those would work.

However, initially I forgot that I "complicated" my spreadsheet. Each of our periods of four weeks in length, and I've added columns for each of the weeks.

Sooooo, I'm going to have to play with the formulas to see if I can get one of them to work for me.

Thank you again.
 

rgillson3

Board Regular
Joined
Oct 3, 2013
Messages
62
Update:

I was able to adjust the SUMIFS formula, to include my "helper" columns, and it seems to work well.
 

Forum statistics

Threads
1,078,394
Messages
5,339,938
Members
399,340
Latest member
JasonT903

Some videos you may like

This Week's Hot Topics

Top