So I dusted off my MacBook Pro and tried it out.Thanks for the tutorial. Good question, and I wondered if he’d encountered some unexpected problem, perhaps a bug, in Mac Excel. Be aware that if you have a header row in your data, but choose not to use it, Excel will treat that row as data.A reader emailed to ask whether you could make a dynamic chart using OFFSET-function-based Names in Excel 2016 for Mac. When you first create a table, you have the option of using your own first row of data as a header row by checking the My table has headers option: If you choose not to use your own headers, Excel will add default header names, like Column1, Column2 and so on, but you can change those at any time.Learn about the latest enhancements to all the Office apps including Word, Excel, Outlook, and PowerPoint.Bottom line: There are several ways to make dynamic charts in Excel, and there seems to be no difference other than cosmetic in how they work between different versions of Excel, and between operating system. See screenshot:Stay on top of the frequent updates to Microsoft Office 365. In the popping Page Setup dialog, enter larger or smaller numbers into Top or Bottom textbox to change the height of header or footer. Click Page Layout > Margins > Custom Margins. For those who use Excel 2013, 2016, or 2019, the instructions in this.Moreover, you can change the height of header or footer in the Page Setup dialog.A bit more complicated is to use Excel’s Names to define the series data for your chart. The easiest way is to use Tables as the chart source data. If the data in the cells changes, so does the chart, but if the data extends to more cells (or shrinks to fewer cells), the chart doesn’t seem to notice.There are a couple ways to create charts that will grow with your data. But once you’ve created a chart, it keeps plotting data from the same cells. Dynamic Charts in ExcelIt’s pretty easy to set up data and create a chart in Excel. This exercise was done completely in Mac Excel 2016, and other than not knowing a few of the shortcuts I use everyday, it was not very different from working in Windows Excel 2016.Excel asks if your table has headers, then it applies a Table style (the yellow style is shown below), it adds AutoFilter dropdown arrows to the field headers, and it puts a small backwards “L” bracket at the bottom right corner of the table.You can change the size of the Table by clicking and dragging the bracket at the bottom left corner of the Table. Lists became the favored source data for charts and also for pivot tables.In Excel 2007, Lists became known as “Tables”, and their capabilities have been expanded in every version since.The screenshot below shows the same data and chart as above, but the data is now in a Table.To get your data into a table, you select it (or select one cell and let Excel figure out how far it stretches), and on the Insert tab of the ribbon, click Table. You could sort and filter your data range easily, and any formula that used a whole column of your List updated to automatically keep using that whole column of the list. These lists were a more structured container for your data, with a database structure of fields (columns) and records (rows), field headers (column headers) and filtering tools. Dynamic Charts Using TablesThe easiest way to make a chart’s contents reflect the size of a range of data is to put the data into a Table.Tables made their appearance in Excel 2003, and were called “Lists”. I’ll describe how to make dynamic charts using Tables, using Names, and using Names in a more flexible way.
If my sales tax rate was stored in cell A1, then my Name SalesTax would have a definition of “=A1”. Names (a/k/a “Defined Names”, “Named Ranges”, etc.)A Name is what Excel calls a variable that resides in a worksheet or a workbook.Names are often assigned to cells or ranges for example, you might place a sales tax rate into a cell and name the cell SalesTax, and subsequently use the cell’s name rather than its address in a formula. Because of this Names have been nicknamed “Named Ranges”.However, the definition of the name includes a formula. A chart that uses all of the existing Table will expand accordingly.This little trick of adding a new series if the data expands accordingly is nice, but it requires that the chart already contain all of the Table’s data. And a chart that uses all rows of the existing Table will expand accordingly.If you type or paste data directly to the right of the Table, the Table will also automatically expand to include this new data. Program in c for beginners on macIf we don’t specify sizes, then the new Names will define ranges the same size as the anchor.Okay, that’s how to build a formula definition for a Name. However, if we add a value in cell A57, it will also expand our range to A2:A8, so we need to make sure the rows below our data are kept blank.The other two definitions are easier: Y1ValuesWe’ve already figured out how large each range needs to be, since the X and Y values have the same number of cells, so both of these OFFSET formulas start with the first name XValues as an anchor, and offset no rows down but one or two columns to the right. It’s easy to see that adding another value into cell A8 will expand this range to A2:A8. I’ll call them XValues, Y1Values, and Y2Values, and I will define them as follows: XValues=OFFSET(Names!$A$1,1,0,COUNTA(Names!$A:$A)-1,1)This OFFSET formula uses cell A1 of worksheet Names as a starting point, offsets the range down by one row and right by zero rows, then makes it as many rows tall as the number of alphanumeric cells in column A minus one (we don’t want to include the “Category” label), and one column wide.So starting with cell A1, our range begins in cell B1, and is 6 rows tall and one column wide our final range is A2:A7. In our sample, we will need three Names. We’ll need one Name for the X values if the series use the same X values range, and we’ll need one Name for the Y values of each series. Create Header Excell 2016 Free Name ManagerYou can enter any formula that refers to cells, or a formula that calculates a value, or a constant value. Otherwise it would be “in scope” for the entire workbook.Then enter the formula where it says “Select the range of cells”. Note that I’ve included the worksheet name and exclamation point, which means the Name will be “in scope” (i.e., available) for the worksheet “Names”. But I’ve cleared all of this so we’re starting fresh.Here I’ve typed the name of the Name. For a truly powerful Name Manager, you should try out the free Name Manager add-in at the website of my colleague, Excel MVP Jan Karel Pieterse.If you’ve selected data before opening the dialog, Excel tries to guess how you want to name data based on labels in the top row and left column of the selection. The Windows dialog is a bit more extensive, and Windows Excel has a much better Names Manager (this dialog happens to serve as the Mac’s Names Manager). It probably looks like the first SERIES formula above (I invariably start with a static chart of the data I want to plot dynamically). The formula for the orange series is =SERIES(Names!$C$1,Names!$A$2:$A$7,Names!$C$2:$C$7,2)We can use the Select Data dialog to modify these, but it’s easiest to simply edit the formula directly.Select the blue series of the dynamic chart, and observe the formula in the Formula Bar. The blue series in the static chart below is =SERIES(Names!$B$1,Names!$A$2:$A$7,Names!$B$2:$B$7,1)This means it uses cell B1 of the sheet Names for the series name (“Alpha”), A2:A7 for the X values, B2:B7 for the Y values, and it’s the first series in the chart. Dynamic Charts Using NamesEvery chart series has a formula that defines the data in the chart. Click the plus icon, and check that the formula refers to C2:C7.Whew! Now we’re finally ready to make our dynamic chart. The static chart isn’t clever enough to notice, but the dynamic chart keeps up nicely, illustrated by the highlighted data in the worksheet.If we extend the data by a new column, the static chart doesn’t change, and the dynamic chart doesn’t add a series to represent the new data.I’ve added a third chart which shows the new data. I’ll select the dynamic charts in the rest of this tutorial to show the range included in these charts.Now let’s extend the data by a couple of rows. It’s convenient that Excel is smart enough to highlight the chart data even if it is defined by dynamic Names. =SERIES(Names!$B$1,Names!XValues,Names!Y1Values,1)If Excel doesn’t like the new formula, make sure you’ve spelled the Names correctly.Similarly edit the formula for the orange series to read =SERIES(Names!$B$1,Names!XValues,Names!Y2Values,2)When we select the static chart, we can see the chart’s source data highlighted in the worksheet.We see the same data highlighted when the dynamic chart is selected.
0 Comments
Leave a Reply. |
Details
AuthorTiffany ArchivesCategories |