 Tweet # Excel For Noobs Tutorial: Excel Tables Formula Cell Reference

Below you can see that we have a table that we used in our previous tutorial. It shows sales for each representative for 2011 and 2012. Suppose that we wanted to add another column in our table that shows the difference in sales for 2012 and 2011. To do this follow the steps below.

Step 1: Activate cell E2 and type Sales Difference and then press Enter. Notice that Excel automatically added a new column to the table.

Step 2: Activate cell E3 and enter = to let Excel know that you are about to insert a formula.

Step 3: Now press the left arrow. You can see that Excel displays =[@[2012 Sales]] as your first argument.

Step 4: Now insert the minus sign and then press the left arrow twice. You can see that Excel displays [@[2011 Sales]] as your second argument for your formula. Step 5: Press Enter and you will end your formula. Excel will automatically fill in the rest of the column with your formula to show the difference in sales from 2012 and 2011 for each sales representative.

Notice that when the formula for the difference refers to the other cells within the table it does not display the cell address. It displays the formula as follows:

=[@[2012 Sales]]-[@[2011 Sales]]

Analyze the formula. The @ symbol stands for this row. So for the argument the @ symbol represents the row number like it would with formulas that dont refer to a table.

You will also notice that this formula consists of nested brackets. The reason 2011 Sales is enclosed in brackets is because the name of the table column has a space in it. However it would work without the brackets. If we would have named our column headers 2011Sale and 2012Sales instead of 2011 Sales and 2012 Sales then Excel would have not enclosed the column header names in brackets.

We could have inserted the formula by manually typing =D3-C3 and Excel would have performed the correct calculation and filled in the rest of the cells in the column just as it did when we pointed to the cells.

## Additional Cell Reference Techniques for Excel Tables

When referring to tables or cells within tables you are able to refer to the table name and then additionally specify what part of the table you want to refer to. You could refer to the entire table, an individual column within the table, a specific cell within the table or other parts of the table. To do this you dont need to create a name for the table because Excel automatically creates generic table names such as Table1. However you always do having the option of giving your tables custom names.

Note: To name a table simply select a cell within the table, then click the Design Tab and locate the Properties group in the ribbon. In the properties group you will see that there is a box where you can add a table name. Simply type in the name you want to give to your table and press Enter.

Take a look at the image below. In a cell outside of our table we began entering the sum formula and typed the letter T in for our first argument. As soon as we entered a letter for our first function argument Excel provided us with a list that consists of mainly functions however it also included our table in the list Table 1. All that I have to do is double click on Table1 in the list and then close the function arguments parenthesis and the result of my function will be the sum of all numeric values within my table not including the column headers and the total row. My function reads =SUM(Table1). If we were to manually type this function into a cell it would provide the same result. Notice in the image above that we entered =SUM(Table1[. Here we began entering our function but have not yet finished entering our function arguments. For our first argument we typed in the name of our table Table1 and then opened brackets. By entering the open bracket Excel provides a list of options. Here I can choose an individual column within Table1. I could choose to find the sum of the values within the 2011 Sales column, the 2012 Sales column, or the Sales Difference column. I can also choose to find the sum of all the data including headers and totals by selecting #All, I could find the sum of all numerical values not including the Total row or the headers by selecting #Data. If I wanted to find the sum of the values entered into the headers row I would select #Headers and if I wanted to find the sum of all the values in the Totals row I would select #Totals. To complete our function argument we will have to close the brackets and the parenthesis. If we wanted to find the sum of the 2011 Sales column within Table 1 our complete formula will be =SUM(Table1[2011 Sales]). If we wanted to find the sum of all the values in Table1 our complete formula would be =SUM(Table1[#All]).

NOTE: Excel will treat all data that is not a numeric value as 0.

Find the next tutorial in the links below. 