Skip to content

How to Create and Use Tables in Excel

    Table Design tab with a cell of the sales table selected

    Creating a table in Excel is essential for working effectively with data, but all too often, files used in business aren’t formatted as tables, resulting in inefficient files that are difficult to manage and complicated to update. In this guide, we’ll explore what an Excel table is and why your files can’t do without one.

    All the instructions in this guide apply to your own work files as well, but if you’d like to follow along step by step using the same file as in the guide, download the dedicated file!

    What Is a Table in Excel

    In Excel, a table is a data structure that organizes and stores information contained in different cells. To put it simply, when you create a table, Excel assigns a specific name to a range of cells and allows you to reference it anywhere in your file. This makes working with files and formulas significantly easier than working with individual cell references.

    You can tell if you have a table in Excel in several ways, such as:

    Name Box showing Table1 when the whole table is selected
    • When you click inside a table, a new menu called “Table Design” will appear
    • When you click in the Name box (next to where you enter formulas), you’ll see a list of the individual tables in your file

    If you click in the Name box and don’t see a specific name, it means there are no tables in your file.

    Sales data as a plain range, without the Table Design tab

    Let’s take an example from this image, which summarizes a fictional database, but one that doesn’t contain a table. Some information is clear:

    • CUSTOMER: This column will contain the customers’ names
    • PRODUCT: This column will contain a single product
    • DATE: Here we’ll find the date of sale
    • PRICE: Here you’ll find the price per car
    • MARKET: Here you’ll find the target market

    However, this information is clear only to us, the file’s creators, since, as we mentioned, we’re not working within a table. Excel treats these cells completely independently, and we’ll never be able to create scalable formulas with this initial structure.

    For example, how would you calculate the total for this “database”?

    =SUM(E3:E102)

    The result is now correct. You’ve surely encountered new sales before, in that case, what do you do? Let’s assume we have 10 new sales. You’d have to update the formula like this:

    =SUM(E3:E112)

    Or, you might think of creating a formula like this:

    =SUM(E:E)

    Neither of these solutions is ideal. In the first case, you’ll keep having to keep up with the expansion of the initial database, constantly having to remember the number of transactions. In the second case, you’re forcing Excel to consider the entire column for the calculation, when there’s absolutely no need to do so.

    So let’s see how to work with modern files by creating a proper table.

    How to Create a Table in Excel

    Creating a table in Excel is fairly simple, and there are several ways to do it.

    Create Table dialog with the range and My table has headers checked

    Method 1: Click inside a cell in the range you want to convert into a table, then press CTRL+T, and Excel will offer you two options. First, it will automatically suggest a range it has identified as a table, which it can identify because there are usually empty cells on the left, top, bottom, and right margins. Once you’ve reviewed the range to make sure it’s correct, you can then specify whether the table has headers. If there are headers (as I hope there are), be sure to check that box.

    Insert tab with the Table button framed

    Method 2: Click inside a cell in the range you want to convert into a table, then click Insert > Table; you’ll find the command next to the one used to create PivotTables. From here, the process is the same as before: you’ll have two options and can specify which cells to include and whether there are headers.

    Format as Table gallery open on the Home tab

    Method 3: Click inside a cell in the range you want to convert into a table, then go to Home > Styles > Format as Table. From here, you can already select various “styling” options for your table.

    Personally, I prefer Method 1, but the result is the same regardless of which one you choose. At this point, you’ll have your table and can start using it however you like!

    A table is also the default output for any data loaded with Power Query, so you may find one already created in the file if the data was sourced from elsewhere and then reloaded into the file.

    What Are the Options in the Table Design Menu in Excel

    Table Design tab with the Properties, Tools and Table Styles groups

    When you create a table and click inside it, you’ll see a new menu called “Table Design” open. This menu controls numerous features related to the table itself, and I think it’s important to understand it in detail so you can easily manage the individual tables you’ll want to create in your file.

    As you can see, when you create a table, two things happen: this menu opens (if you click inside the table), and the Name box displays the name of the table you just created.

    Table Design in Excel: The Properties Menu

    Resize Table in the Properties group of the Table Design tab

    In the Properties section of the Table Design menu in Excel, you can change the table’s name and resize it. My suggestion is to follow a consistent naming convention for tables; for example, in my files, I always start with “TBL_” and then add the relevant name. For instance, I might have tables named like this:

    • TBL_SALES, which contains all sales
    • TBL_PRODUCTS, which contains all the products
    • TBL_CUSTOMERS, where all customers are listed

    This makes it easier for me to use formulas, and referencing ranges becomes very simple. If, on the other hand, you always name tables differently, you’ll have trouble quickly remembering which tables you need.

    If you frequently collaborate with others in your company, I strongly recommend establishing a common naming convention for all files, specifying that all tables start with “tbl_,” “xtbl_,” or “tab_” will make working with other files incredibly easier.

    Resizing a table is mainly useful when the table doesn’t account for columns located to the right of the initial data. By clicking this button, you can specify how far the table should extend, including the new columns.

    Table Design in Excel: The Tools Menu

    Convert to Range in the Tools group of the Table Design tab

    Let’s now see what we can do by accessing the Tools menu in Excel’s Table Design. These are among the most useful commands for tables, as they allow us to perform certain standard operations for data analysis.

    The first command is “Summarize with PivotTable.” This button creates a PivotTable from the table, and, a point not to be overlooked, the PivotTable will be fully scalable. This means that Excel doesn’t care whether the source table has 10 rows or 10,000, if you refresh the PivotTable, it will include all the values contained within the source table. This is a significant difference compared to creating a PivotTable from a range, where you must constantly keep track of the number of rows to include in the PivotTable. If you’d like to learn more about creating PivotTables, you’ll find a dedicated guide here.

    The second command is Remove Duplicates. In this case, I strongly advise against using it, since you can achieve the same result either by using Power Query to remove duplicate values or by using the UNIQUE function in the analysis section, available in Excel for Microsoft 365. Using “Remove Duplicates” creates a problem in the source table because, if a colleague were to view this file after the duplicates have been removed, they would have absolutely no idea that some of the data were originally duplicate values.

    The third command is “Convert to Range.” If you no longer need the table, you can click this command, and the table will be deleted. I rarely use it, since tables are an essential pillar of my files, but it’s a command worth knowing in case you ever need it.

    Sales table with the PRICE + VAT column and the PRODUCT slicer

    The fourth command is Insert Slicer. Slicers are interactive buttons you may have seen when using PivotTables, particularly when creating custom dashboards. Personally, I don’t use them much in this capacity since I use tables as a source of raw data, but I rarely filter them because the analyses are performed on other sheets. However, if you want to see at a glance some information related to a subset of your database, this is definitely a great way to do it.

    Insert Slicers dialog listing the columns of the table

    Every time you select “Insert Slicer,” you can choose the column you’re interested in. In this case, we’re selecting the PRODUCT column, but you could have multiple slicers on the same sheet and create a sort of dashboard, if you wish.

    PRODUCT slicer next to the sales table

    Once you’ve selected the slicer, you can click on each entry to see only a selection from the original table. If you’d like, you can also view multiple options at once by clicking the button with the three checkmarks in the header. If you want to remove all your selections, you can click the filter button, also located at the top of the header.

    Table filtered on FIAT with the PRODUCT slicer

    If I select FIAT, I’ll see only the values for FIAT. The same would apply to the other cars, generating a visualization that, at a glance, can already provide some additional information.

    However, you might also want to see some aggregated results based on this selection. Let’s see how to do that.

    SUBTOTAL in G1 adding PRICE + VAT for the filtered rows only

    In this case, you may find the SUBTOTAL function useful, which is used when you need to work with ranges filtered by a Slicer or a Timeline. Here’s an example of how to create a dynamic chart and how it works specifically, but essentially SUBTOTAL consolidates numerous operations without requiring complex calculations. For example, if you wanted to see the sum of the filtered values for the table named TBL_SALES in the PRICE + VAT column, you could enter the following formula:

    =SUBTOTAL(9,TBL_SALES[PRICE + VAT])

    As we mentioned, SUBTOTAL considers only the cells visible on the screen. Since 9 corresponds to the sum of the values found, in this case we’re performing a conditional sum exclusively on the displayed values, which correspond to the rows containing “FIAT.”

    Here’s another tip for quickly viewing certain data when you’re working with only a subset of the table.

    Status bar with average, count, minimum, maximum and sum of the selection

    By right-clicking in the lower-right corner of your Excel workbook, just before the section for zoom and view settings, you can select which information to see at a glance when you select a range. For example, you might want to see the average of the data, the count, and other numerical information. I use this section to determine whether a value is a number or not, if you select two cells and “Count: 2” appears, it means they’re text; otherwise, you should see the numerical values you selected earlier.

    In this case, we can see that there are 100 values in the table, along with the average, minimum, maximum, and sum.

    Table Design in Excel: The External Table Data Menu

    Whole table selected with the Table Design tab open

    You’ll notice that the third section of the Table Design menu is called External Table Data. This section is useful if you’re using tables for advanced purposes, as it allows you to export data to SharePoint, set the refresh intervals for the query that generates the table, and configure various other settings for maintaining the data. For example, from here you might want to disconnect the table so it’s no longer updated in subsequent file edits.

    As you’ve probably realized, this section will only come in handy once you’ve created more complex files, where keeping the data accurate and up-to-date is essential.

    Table Design in Excel: The Table Style Options and Table Styles Menus

    Refresh in the External Table Data group of the Table Design tab

    The table structure in Excel also includes two menus related to table style, called “Table Style Options” and “Table Styles.”

    Table Styles gallery open on the Table Design tab

    Table Style Options lets you quickly change the table’s layout, for example, by modifying how the first and last columns appear, specifying whether alternating columns should have different colors, and so on. From this section, you can also add a total row, which does not affect the rest of the table and will always appear at the bottom relative to the other data in the table. Even if you update the table with new data, the total row will incorporate this new data without any issues. I find this section somewhat unnecessary, since data presented in table format does not require any special graphical formatting to be usable.

    New Table Style at the bottom of the Table Styles gallery

    The “Table Styles” menu is a different matter; here, you can choose one of the custom styles for individual tables. By default, I recommend avoiding overly heavy layouts with dark background colors like dark blue or black; instead, use simple, clean backgrounds with a clear indication of the headers. In tables, it’s essential to know what the headers are called and where they are located, but monitoring the entered data is less important as long as the data is consistent.

    New Table Style dialog to create a custom style

    Creating a custom style is a great way to maintain internal consistency, and Excel offers numerous options for doing so, such as defining styles for the entire table, the header, and so on. I usually choose to create a simple style that I then use as the standard for the entire file, to avoid “patchwork” tables that are hard to read and make little sense to the end user.

    EXCEL TRAINING

    Want to bring these skills to your team?

    I design Excel training paths based on your goals, the participants' level and the cases you actually face at work.

    Marco Filocamo

    Marco Filocamo · Microsoft Excel MVP

    Do you have a specific file or process to improve? Explore Excel consulting →

    The Benefits of Using a Table in Excel

    Let’s now look at the main advantages of using a table in Excel. I don’t think I could do my job as an Excel consultant and trainer without using tables; I believe they are one of the essential pillars for creating scalable files that are easy to explain and can be maintained with just a few quick adjustments.

    The columns in an Excel table have consistent values

    Internal consistency is essential in any table. This means that, for each record (row), the calculation will always be the same, avoiding custom calculations that only risk creating problems. This means that:

    • Calculations must be defined precisely, since a change in the formula affects all other records in the table
    • It is good practice not to include “ad hoc” rules, except in very special cases
    • The calculations in the column apply to our current data and will then be automatically applied to new values in the table as well, should the table expand. We will therefore no longer need to drag any formulas

    If you use tables, you’ll no longer have to drag and drop formulas into your Excel files. This is already a huge advantage, but let’s look at a concrete example

    Calculated column PRICE + VAT with the formula using [@PRICE]

    Let’s say we want to calculate the starting price from our database, but this time we want to include 22% VAT. If we didn’t have the table, the formulas would be =E3*1.22, which, when dragged, would become =E4*1.22, and so on.

    However, if we create this formula to the right of our starting table, we’ll see that a formula slightly different from the usual one is automatically generated:

    =[@PRICE]*1.22

    When we see a structure like [@Y], it means we’re working within a table, more specifically, we’re taking the value from the Y column corresponding to the current row. In our case, we’re therefore considering the value in the PRICE column corresponding to the row we’re working on.

    Calculated column filled automatically for every row of the table

    This procedure confirms that the data will be consistent throughout our entire table, since the calculation [@PRICE]*1.22 will be the same for all our records. This means that all data in the PRICE column, without exception, will be multiplied by 1.22 in the column labeled PRICE+VAT.

    To verify that all formulas in a file are consistent, I also use a paid plugin (PerfectXL Highlighter, here’s the link in case you’d like to learn more), but if you’re working with spreadsheets, you should be able to use this data with reasonable confidence that there are no hidden errors in the calculations.

    The Excel table expands automatically

    Excel tables automatically expand when the starting range changes. For example, let’s say we create a table that is sourced from an external data source using Power Query. In the first week, we have 200 records; in the second week, the number of records increases to 500.

    The Excel table will have 200 records in the first week. When we update the query that populates it, the table will now have 500 rows, and so on. The calculations performed on the first 200 records will automatically be applied to the additional 300 records as well. If we have a PivotTable derived from the table, we simply need to refresh the data in the PivotTable to automatically include these additional 300 records.

    As a result, tables are a phenomenal tool for ensuring that the data used is as up-to-date as possible, if you have multiple tables derived from queries, simply updating the queries will provide the latest data and automatically update not only the tables but also all the analysis sheets derived from those same tables.

    To reiterate a previous point: if you update the data in a table, you won’t need to drag the formulas because the calculations will automatically apply to the source table. But if you want the total for the column PRICE in the table named TBL_SALES, you can enter the following directly:

    =SUM(TBL_SALES[PRICE])

    In the first week, this formula will consider 200 records. In the second week, 500. The good news is that, once set up, you’ll never have to touch it again because, as the table expands, the data will be pulled automatically.

    Finding Excel tables is easy, thanks to the Name box

    Name Box showing Table1 when the whole table is selected

    Navigating Excel worksheets can be complex, but it’s easy if all your data has been entered into dedicated tables. Instead of searching through countless worksheets with complex names (and here I strongly recommend that you never name a worksheet with a space in the middle, since that makes formulas much more complicated), you can simply go to the Name box and select the table you’re interested in.

    Once you’ve selected the table, Excel will take you directly to that specific table, saving you time and making it incredibly easy to check your data sources, compared to using Excel without tables.

    Let’s compare the ease of figuring out what =ANALYSIS_2024!C4:C192 is with searching for a table called TBL_SALES, which is immediately available with just one click.

    If we work exclusively with tables, we know at a glance how many tables are in our file and can quickly assess their usefulness. If we see that there are 50 tables, we might wonder whether it’s possible to consolidate them. If we see that their names vary significantly, we can standardize the individual data entries. If we see that there are no tables on the worksheet, we’ll begin the process of reviewing the analyzed data to insert them and speed up the entire data analysis process, from source to output.

    Excel tables are the perfect source for Excel formulas

    Formula AutoComplete suggesting TBL_SALES while typing =UNIQUE(TBL

    Excel tables are the perfect source for creating Excel formulas that are easy to read, maintain, and update. Just as with PivotTables, which are generated automatically and incorporate new data from the table, the same applies when working with tables and performing targeted analyses using scalable formulas. As you can see in the image, by simply typing “TBL,” we already see the name of our table, so we no longer need to navigate through individual sheets, we just need to think about the name of the table we’re interested in.

    When we have tables on a worksheet, we can quickly retrieve data from them in various ways:

    Formula AutoComplete listing the columns of TBL_SALES
    • If all your tables start the same way, for example, with “TBL”, you can begin writing formulas like =SUM(TBL...), and all the tables in the worksheet will appear directly on the screen. This will make creating complex formulas incredibly easier, since we won’t have to search for the various ranges throughout the file (as seen previously)
    • If the option highlighted in blue is the one we’re interested in, we can simply press TAB, and Excel will select the table we want. Again, naming tables correctly is a great way to reduce the time needed to create individual formulas
    • At this point, there’s another trick to consider. Since we’re no longer working with cell ranges (such as A4:A123), we need to select the headers of our table. In this case, once the table is selected, we simply need to use square brackets [ and ] to select our range. For example, TBL_SALES[CUSTOMER] indicates that we are in the table named TBL_SALES, where we want to retrieve the values for the CUSTOMER column. In the image above, you can use the arrow keys to select the column you’re interested in, or type its name and then press TAB, closing the selection at the end with square brackets. From this interface, you can also extract the column headers, for example, which may come in handy for any control dashboards.
    • There are therefore three key points to remember: standardize table names, use the TAB key, and open and close the range with square brackets. That’s all you need to quickly reference these ranges, and you’ll soon realize how simple it is to build individual formulas
    • Here’s an alternative: if you’re writing a formula and want to retrieve a column and its values, you can also click inside the column and then press CTRL+SPACE to select the entire column. If you start typing =COUNTA(...) and then click in any cell in the TBL_SALES table in the PRICE column, and then press CTRL+SPACE BAR, the formula will automatically become =COUNTA(TBL_SALES[PRICE]). This trick can be useful if you’re working on third-party files and don’t have all the headers perfectly memorized, since they can be very similar to one another
    • Since we’re talking about tables, you generally won’t need to “drag” the formulas. If you do need to do so, since we can no longer write formulas with dollar signs, you can do it this way by adding a second set of square brackets: =SUM(TBL_CUSTOMER[[PRICE]:[PRICE]]). With this formula, no matter where you move on the sheet, you’ll always calculate the sum of the price and won’t include any other columns you don’t need

    Let’s look at a practical example using our database to explain the difference between using scalable and non-scalable tables. Specifically, let’s answer this question: “Who are the top corporate clients, ranked from most important to least important, listing both the client’s name and the total revenue generated?”

    This question can be easily answered using a PivotTable with the customer names in the rows and the revenue (price, in this case) in the values. However, PivotTables require a bit of attention since they need to be updated, whereas formulas automatically update the entire reference.

    How to Analyze Data in Excel Without a PivotTable

    Let’s find out how to identify the top corporate clients, ranked from most important to least important, if you’re not working with tables in Excel. We’ll go through the individual steps, although this is a process I strongly advise against.

    Data tab with Remove Duplicates framed for the customer list

    First, we need to copy the customer names, taken from the entire worksheet, into another analysis worksheet. Here, we’re considering all of them, but we need to remove duplicates. So, click on Data > Remove Duplicates.

    Obviously, with this approach, it would be impossible for a third party to understand what we’ve done, and any new clients added to the original range wouldn’t be included in our calculations.

    Remove Duplicates dialog with the CUSTOMERS column checked

    We tell Excel that we want to remove duplicates from column B, since the customers were entered in that column.

    Remove Duplicates dialog with the customer column selected

    Excel tells us that 64 unique values remain, so we have 64 initial customers. Some of them have placed multiple orders.

    SUMIFS on whole columns in the first row of the old analysis

    Since we have no idea how large the initial range is, we can proceed in several ways. One possible approach is to include all the data in the column to avoid errors:

    =SUMIFS(DB!E:E,DB!B:B,B3)

    We could also write =SUMIFS(DB!$E$3:$E$102,DB!$B$3:$B$102,$B$3), since there are 100 results in this case. However, if we consider the entire column, we can see that this formula is already more scalable and accurate than the one with dollar signs. The problem here is that we’re potentially forcing Excel to work with ranges of more than a million rows, making the calculation inefficient.

    SUMIFS copied down for every customer of the old analysis

    At this point, all we have to do is drag the formula to find the revenue for the other customers as well. Even in this case, the process is not at all scalable, since the formulas will only go as far as they find a customer, but if the source data were to change, the result could be misleading because it wouldn’t account for new customers.

    Even if we were to repeat the process of removing duplicates, we’d still have to perform additional, tedious steps that risk significantly complicating the entire data analysis.

    Customer list of the old analysis without tables

    At this point, we can apply filters either by clicking Home > Sort & Filter or by pressing CTRL+SHIFT+L. This will allow us to sort the data as we prefer.

    Data tab with the Filter button framed and filters on the range

    Since we want to sort the range by prioritizing the best customers first, we click on “Sort from largest to smallest” so that we can quickly view the best customers in our range.

    Customers sorted from largest to smallest revenue

    At this point, the data is sorted, but the risk of error is very high here. We might have new sales and new customers that haven’t been accounted for, resulting in incomplete statistics, furthermore, we’ll always need to monitor the expansion of the initial dataset, which will likely be done by copying and pasting from various files.

    How to Analyze Data in Excel Starting from a Table

    Let’s see instead how our data analysis would work if we had an Excel table to start with, as in our case. I’m using the 365 formulas (Dynamic Array), but what matters is the underlying logic, don’t worry if some steps are explained briefly.

    First of all, let’s extract the unique customer values and enter them into cell B4:

    UNIQUE extracting the customers from TBL_SALES

    =UNIQUE(TBL_SALES[CUSTOMER])

    Even someone who has never seen this file before will understand that we’re extracting the individual customer names. We’re not taking the entire column, but only the values from the CUSTOMER column of the TBL_SALES table. This greatly simplifies the file’s readability and speeds up processing.

    Now let’s see how to generate the sales figures, which are entered in cell C4:

    SUMIFS using the TBL_SALES columns for each customer

    =SUMIFS(TBL_SALES[PRICE],TBL_SALES[CUSTOMER],B4#)

    When working with arrays, we’ll use B4# as the starting point for individual customers. In this case as well, the formula is perfectly readable even for those with less Excel expertise: we’re simply summing all the price values for each customer.

    SORT ordering the customers by revenue from largest to smallest

    =SORT(B4#:C4#,2,-1)

    Now let’s sort the two arrays (customers and revenue) based on the values in the second column, that is, revenue (2), in descending order (-1). This will sort all our values, and this formula will work regardless of how the original table is expanded, quickly generating the necessary data.

    If we wanted to do everything in one go, we could do it this way to combine the individual steps:

    LET and HSTACK building the whole analysis in one formula

    =LET(range_customers,TBL_SALES[CUSTOMER],
    customers,UNIQUE(range_customers),
    range_revenue,TBL_SALES[PRICE],
    revenue,SUMIFS(range_revenue,range_customers,customers),
    final,SORT(HSTACK(customers,revenue),2,-1),
    final)

    This formula simply explains the individual steps above by eliminating the need for auxiliary columns, specifying via LET which cells we are using and, with HSTACK, how they should be combined.

    There’s an even better solution, thanks to the GROUPBY function:

    GROUPBY returning the revenue of each customer in one formula

    =GROUPBY(TBL_SALES[CUSTOMER],
    TBL_SALES[PRICE],
    SUM,,
    0,
    -2)

    This function requires us to specify:

    • What are the grouping criteria? In this case, the customers with TBL_SALES[CUSTOMER]
    • What is the range we want to use for the calculations, namely TBL_SALES[PRICE]
    • what calculation we’re interested in, namely SUM
    • We then specify that we do not want row headers and, by setting it to 0, that we do not want totals
    • We specify that we want the sort order to be descending in the second column, so -2

    Regardless of the solution you choose, the main difference is that the table-based approach is scalable. If the table has 100 new rows, they will be automatically processed. In the first case, without a table, the risk of error and the time required to maintain the file are significantly higher, as already mentioned, I don’t recommend this approach; it’s much better to work with tables and optimize your files for numerous reasons, which we’ll summarize now in the conclusions.

    Conclusions

    As we’ve seen, there are many reasons to use tables in Excel:

    • Tables clearly define the structure of the analysis data, consistently highlighting the table name, headers, and calculations
    • Calculations based on tables are scalable. This means that Excel doesn’t care how many rows we’re considering; if we start from a table, our formulas will always be based on the entire database, avoiding problems when updating information
    • Shortcuts for creating formulas make it easy to build even complex analysis structures. Knowing how to use TAB and [] allows us to navigate the worksheet quickly and smoothly, thanks in part to the table lookup feature in the Name box

    Ultimately, every Excel workbook should include tables to be effective. If you’re not using them yet, simply press CTRL+T to create one and take advantage of all the tips in this guide!

    Leave a Reply

    Your email address will not be published. Required fields are marked *