If the cell pointer is anywhere in the data table when you open the Create PivotTable dialog box, Excel automatically determines the address of the entire table and enters it in the Table/Range field of the dialog box. If you want to explicitly tell Excel where the input data range is located, you can do one of the following:

Figure 2-1: Specifying the data range in the Create PivotTable dialog box.
Actually, there is a fourth and preferred way to tell Excel where the data are—create a named range for the data. Using named ranges is more convenient than typing the address or selecting the data each time you want to refer to them. Named ranges also provide an advantage in that if you expand the range, perhaps to include additional data, the PivotTable report will automatically include the new data when it is refreshed. Here’s how to create a named range:

Figure 2-2: Defining a named range.
Then, when you are creating a PivotTable, simply enter the range name in the Table/Range field, as shown in Figure 2-3 for the range Name SalesData. Of course, if you enter a name that does not exist, it will not work. Excel displays an error message when you click OK. You’ll have to correct the range name you entered or use one of the other techniques to specify the source data range for your PivotTable.
Figure 2-3: Specifying the data range by entering a range name in the Create PivotTable dialog box.