Excel automatically update graph when adding new columns and rows in data









up vote
2
down vote

favorite












Line graph and source table



My excel graph comes from a table in another sheet, as shown in the above image.



The X-axis of the graph shows the month/year headers in blue in row 3 except column A&B (.... 43.july17, 44.aug17, ...).



The Y axis shows the Ave. subs length in row 57 except column A&B.



Every month I need to insert a new month/year column, in this case between column AY and AZ. I also need to insert new monthly row data, in this case under Month 14 in row 17, so that the Ave. Subs length row is moving 1 row down every month.



Data under the TOTALS column (AZ) are not included in the graph. I currently use the graph formula:



=SERIES(,'Cohorts(32015)'!$C$3:$AX$3,'Cohorts(32015)'!$C$57:$AX$57,1)


However, it does not automatically update when I add new columns to the table. Is there a way to do this?










share|improve this question



























    up vote
    2
    down vote

    favorite












    Line graph and source table



    My excel graph comes from a table in another sheet, as shown in the above image.



    The X-axis of the graph shows the month/year headers in blue in row 3 except column A&B (.... 43.july17, 44.aug17, ...).



    The Y axis shows the Ave. subs length in row 57 except column A&B.



    Every month I need to insert a new month/year column, in this case between column AY and AZ. I also need to insert new monthly row data, in this case under Month 14 in row 17, so that the Ave. Subs length row is moving 1 row down every month.



    Data under the TOTALS column (AZ) are not included in the graph. I currently use the graph formula:



    =SERIES(,'Cohorts(32015)'!$C$3:$AX$3,'Cohorts(32015)'!$C$57:$AX$57,1)


    However, it does not automatically update when I add new columns to the table. Is there a way to do this?










    share|improve this question

























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      Line graph and source table



      My excel graph comes from a table in another sheet, as shown in the above image.



      The X-axis of the graph shows the month/year headers in blue in row 3 except column A&B (.... 43.july17, 44.aug17, ...).



      The Y axis shows the Ave. subs length in row 57 except column A&B.



      Every month I need to insert a new month/year column, in this case between column AY and AZ. I also need to insert new monthly row data, in this case under Month 14 in row 17, so that the Ave. Subs length row is moving 1 row down every month.



      Data under the TOTALS column (AZ) are not included in the graph. I currently use the graph formula:



      =SERIES(,'Cohorts(32015)'!$C$3:$AX$3,'Cohorts(32015)'!$C$57:$AX$57,1)


      However, it does not automatically update when I add new columns to the table. Is there a way to do this?










      share|improve this question















      Line graph and source table



      My excel graph comes from a table in another sheet, as shown in the above image.



      The X-axis of the graph shows the month/year headers in blue in row 3 except column A&B (.... 43.july17, 44.aug17, ...).



      The Y axis shows the Ave. subs length in row 57 except column A&B.



      Every month I need to insert a new month/year column, in this case between column AY and AZ. I also need to insert new monthly row data, in this case under Month 14 in row 17, so that the Ave. Subs length row is moving 1 row down every month.



      Data under the TOTALS column (AZ) are not included in the graph. I currently use the graph formula:



      =SERIES(,'Cohorts(32015)'!$C$3:$AX$3,'Cohorts(32015)'!$C$57:$AX$57,1)


      However, it does not automatically update when I add new columns to the table. Is there a way to do this?







      excel graph charts formula






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 11 at 16:29









      Wizhi

      3,2911730




      3,2911730










      asked Aug 21 at 1:25









      Charisse

      113




      113






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Yes it is :).



          There is a function in Excel called "Name Manager". There you can define ranges (name a range or a cell/cells) and therefore make ranges dynamic as you insert or delete columns or rows.



          Guide:



          Go to "Formulas" -> "Defined Names" -> "New.."



          enter image description here



          I create two ranges (notice I use absolute reference with $).



          enter image description here



          1 - The first one is for the axis values (43.july17, 44.aug17 etc..). I call it "Month_Name". Notice you need to do it from $C$3 given your example.



          =OFFSET(Sheet1!$AS$3,0,0,1,COUNTA(Sheet1!$AS$3:$AZ$3)-1)


          2- The second one is for your data range (Ave. subs length). I call the range: "Ave_Sub".



          =OFFSET(Sheet1!$AS$57,0,0,1,COUNTA(Sheet1!$AS$57:$AZ$57)-1)


          Click on your series (in your graph/chart) and change your series names to the sheet name + named range i.e. in my case the sheet name is "Sheet1":



          =SERIES(;Sheet1!Month_Name;Sheet1!Ave_Sub;1)


          enter image description here



          When you add rows or columns now, the graph will automatically expand (I added 1 row and one column).



          enter image description here





          Details about formula:



          So how does it work?



          Syntax for the formula is:



          =OFFSET(reference, rows, cols, [height], [width])


          and in our case



          =OFFSET(Sheet1!$AS$3,0,0,1,COUNTA(Sheet1!$AS$3:$AZ$3)-1)


          Where:



          reference: is our start column, $AS$3.



          rows and cols: We don't want to offset any column or rows. Therefore: 0,0.



          [height]: = 1 since we have one row.



          [width] = COUNTA(Sheet1!$AS$3:$AZ$3)-1, we take the first column we want to have in our chart and the last column in the range we possible want to add or delete a column. In our case the "Total" will be our last column. But we don't want "Total" to appear therefore we take -1 in our range.



          Generic formulas to expand ranges:



          For columns:



          =OFFSET(<sheet name="">!<start cell="">,0,0,1,COUNTA(<sheet name="">!<column name="">:<column name="">) - 1)


          For rows:



          =OFFSET(<Sheet name>!<start cell>,0,0,COUNTA(<Sheet name>!<Column name>:<Column name>) - 1)





          share|improve this answer






















            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51940402%2fexcel-automatically-update-graph-when-adding-new-columns-and-rows-in-data%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            Yes it is :).



            There is a function in Excel called "Name Manager". There you can define ranges (name a range or a cell/cells) and therefore make ranges dynamic as you insert or delete columns or rows.



            Guide:



            Go to "Formulas" -> "Defined Names" -> "New.."



            enter image description here



            I create two ranges (notice I use absolute reference with $).



            enter image description here



            1 - The first one is for the axis values (43.july17, 44.aug17 etc..). I call it "Month_Name". Notice you need to do it from $C$3 given your example.



            =OFFSET(Sheet1!$AS$3,0,0,1,COUNTA(Sheet1!$AS$3:$AZ$3)-1)


            2- The second one is for your data range (Ave. subs length). I call the range: "Ave_Sub".



            =OFFSET(Sheet1!$AS$57,0,0,1,COUNTA(Sheet1!$AS$57:$AZ$57)-1)


            Click on your series (in your graph/chart) and change your series names to the sheet name + named range i.e. in my case the sheet name is "Sheet1":



            =SERIES(;Sheet1!Month_Name;Sheet1!Ave_Sub;1)


            enter image description here



            When you add rows or columns now, the graph will automatically expand (I added 1 row and one column).



            enter image description here





            Details about formula:



            So how does it work?



            Syntax for the formula is:



            =OFFSET(reference, rows, cols, [height], [width])


            and in our case



            =OFFSET(Sheet1!$AS$3,0,0,1,COUNTA(Sheet1!$AS$3:$AZ$3)-1)


            Where:



            reference: is our start column, $AS$3.



            rows and cols: We don't want to offset any column or rows. Therefore: 0,0.



            [height]: = 1 since we have one row.



            [width] = COUNTA(Sheet1!$AS$3:$AZ$3)-1, we take the first column we want to have in our chart and the last column in the range we possible want to add or delete a column. In our case the "Total" will be our last column. But we don't want "Total" to appear therefore we take -1 in our range.



            Generic formulas to expand ranges:



            For columns:



            =OFFSET(<sheet name="">!<start cell="">,0,0,1,COUNTA(<sheet name="">!<column name="">:<column name="">) - 1)


            For rows:



            =OFFSET(<Sheet name>!<start cell>,0,0,COUNTA(<Sheet name>!<Column name>:<Column name>) - 1)





            share|improve this answer


























              up vote
              0
              down vote













              Yes it is :).



              There is a function in Excel called "Name Manager". There you can define ranges (name a range or a cell/cells) and therefore make ranges dynamic as you insert or delete columns or rows.



              Guide:



              Go to "Formulas" -> "Defined Names" -> "New.."



              enter image description here



              I create two ranges (notice I use absolute reference with $).



              enter image description here



              1 - The first one is for the axis values (43.july17, 44.aug17 etc..). I call it "Month_Name". Notice you need to do it from $C$3 given your example.



              =OFFSET(Sheet1!$AS$3,0,0,1,COUNTA(Sheet1!$AS$3:$AZ$3)-1)


              2- The second one is for your data range (Ave. subs length). I call the range: "Ave_Sub".



              =OFFSET(Sheet1!$AS$57,0,0,1,COUNTA(Sheet1!$AS$57:$AZ$57)-1)


              Click on your series (in your graph/chart) and change your series names to the sheet name + named range i.e. in my case the sheet name is "Sheet1":



              =SERIES(;Sheet1!Month_Name;Sheet1!Ave_Sub;1)


              enter image description here



              When you add rows or columns now, the graph will automatically expand (I added 1 row and one column).



              enter image description here





              Details about formula:



              So how does it work?



              Syntax for the formula is:



              =OFFSET(reference, rows, cols, [height], [width])


              and in our case



              =OFFSET(Sheet1!$AS$3,0,0,1,COUNTA(Sheet1!$AS$3:$AZ$3)-1)


              Where:



              reference: is our start column, $AS$3.



              rows and cols: We don't want to offset any column or rows. Therefore: 0,0.



              [height]: = 1 since we have one row.



              [width] = COUNTA(Sheet1!$AS$3:$AZ$3)-1, we take the first column we want to have in our chart and the last column in the range we possible want to add or delete a column. In our case the "Total" will be our last column. But we don't want "Total" to appear therefore we take -1 in our range.



              Generic formulas to expand ranges:



              For columns:



              =OFFSET(<sheet name="">!<start cell="">,0,0,1,COUNTA(<sheet name="">!<column name="">:<column name="">) - 1)


              For rows:



              =OFFSET(<Sheet name>!<start cell>,0,0,COUNTA(<Sheet name>!<Column name>:<Column name>) - 1)





              share|improve this answer
























                up vote
                0
                down vote










                up vote
                0
                down vote









                Yes it is :).



                There is a function in Excel called "Name Manager". There you can define ranges (name a range or a cell/cells) and therefore make ranges dynamic as you insert or delete columns or rows.



                Guide:



                Go to "Formulas" -> "Defined Names" -> "New.."



                enter image description here



                I create two ranges (notice I use absolute reference with $).



                enter image description here



                1 - The first one is for the axis values (43.july17, 44.aug17 etc..). I call it "Month_Name". Notice you need to do it from $C$3 given your example.



                =OFFSET(Sheet1!$AS$3,0,0,1,COUNTA(Sheet1!$AS$3:$AZ$3)-1)


                2- The second one is for your data range (Ave. subs length). I call the range: "Ave_Sub".



                =OFFSET(Sheet1!$AS$57,0,0,1,COUNTA(Sheet1!$AS$57:$AZ$57)-1)


                Click on your series (in your graph/chart) and change your series names to the sheet name + named range i.e. in my case the sheet name is "Sheet1":



                =SERIES(;Sheet1!Month_Name;Sheet1!Ave_Sub;1)


                enter image description here



                When you add rows or columns now, the graph will automatically expand (I added 1 row and one column).



                enter image description here





                Details about formula:



                So how does it work?



                Syntax for the formula is:



                =OFFSET(reference, rows, cols, [height], [width])


                and in our case



                =OFFSET(Sheet1!$AS$3,0,0,1,COUNTA(Sheet1!$AS$3:$AZ$3)-1)


                Where:



                reference: is our start column, $AS$3.



                rows and cols: We don't want to offset any column or rows. Therefore: 0,0.



                [height]: = 1 since we have one row.



                [width] = COUNTA(Sheet1!$AS$3:$AZ$3)-1, we take the first column we want to have in our chart and the last column in the range we possible want to add or delete a column. In our case the "Total" will be our last column. But we don't want "Total" to appear therefore we take -1 in our range.



                Generic formulas to expand ranges:



                For columns:



                =OFFSET(<sheet name="">!<start cell="">,0,0,1,COUNTA(<sheet name="">!<column name="">:<column name="">) - 1)


                For rows:



                =OFFSET(<Sheet name>!<start cell>,0,0,COUNTA(<Sheet name>!<Column name>:<Column name>) - 1)





                share|improve this answer














                Yes it is :).



                There is a function in Excel called "Name Manager". There you can define ranges (name a range or a cell/cells) and therefore make ranges dynamic as you insert or delete columns or rows.



                Guide:



                Go to "Formulas" -> "Defined Names" -> "New.."



                enter image description here



                I create two ranges (notice I use absolute reference with $).



                enter image description here



                1 - The first one is for the axis values (43.july17, 44.aug17 etc..). I call it "Month_Name". Notice you need to do it from $C$3 given your example.



                =OFFSET(Sheet1!$AS$3,0,0,1,COUNTA(Sheet1!$AS$3:$AZ$3)-1)


                2- The second one is for your data range (Ave. subs length). I call the range: "Ave_Sub".



                =OFFSET(Sheet1!$AS$57,0,0,1,COUNTA(Sheet1!$AS$57:$AZ$57)-1)


                Click on your series (in your graph/chart) and change your series names to the sheet name + named range i.e. in my case the sheet name is "Sheet1":



                =SERIES(;Sheet1!Month_Name;Sheet1!Ave_Sub;1)


                enter image description here



                When you add rows or columns now, the graph will automatically expand (I added 1 row and one column).



                enter image description here





                Details about formula:



                So how does it work?



                Syntax for the formula is:



                =OFFSET(reference, rows, cols, [height], [width])


                and in our case



                =OFFSET(Sheet1!$AS$3,0,0,1,COUNTA(Sheet1!$AS$3:$AZ$3)-1)


                Where:



                reference: is our start column, $AS$3.



                rows and cols: We don't want to offset any column or rows. Therefore: 0,0.



                [height]: = 1 since we have one row.



                [width] = COUNTA(Sheet1!$AS$3:$AZ$3)-1, we take the first column we want to have in our chart and the last column in the range we possible want to add or delete a column. In our case the "Total" will be our last column. But we don't want "Total" to appear therefore we take -1 in our range.



                Generic formulas to expand ranges:



                For columns:



                =OFFSET(<sheet name="">!<start cell="">,0,0,1,COUNTA(<sheet name="">!<column name="">:<column name="">) - 1)


                For rows:



                =OFFSET(<Sheet name>!<start cell>,0,0,COUNTA(<Sheet name>!<Column name>:<Column name>) - 1)






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Nov 11 at 0:29

























                answered Nov 11 at 0:09









                Wizhi

                3,2911730




                3,2911730



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51940402%2fexcel-automatically-update-graph-when-adding-new-columns-and-rows-in-data%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to how show current date and time by default on contact form 7 in WordPress without taking input from user in datetimepicker

                    Syphilis

                    Darth Vader #20