Create Dynamic Pivot Tables

A powerful feature of Microsoft Excel that I encourage everyone to check out is the Pivot Table. This element of Excel allows you to get great insights into your data.
One thing that confuses people though is when they add to their source data but the Pivot Table does not reflect the changes

Creating a Dynamic Pivot Table

The trick is to create a “dynamic named range”. Rather than just add your table in the usual way, you need to create your pivot table using the named range, then you can add data, refresh, and the new data will automatically show up.

Creating the Named Range

To create your named range in Excel 2007 go to Formulas > Define Name

You will need to supply a name for the range, for example “Data”.

In the Refers To box, enter an Offset formula. This defines the range size in the following way:

 ==OFFSET(Sheet1!$A$1,0,0, COUNTA(Sheet1!$A:$A), COUNTA(Sheet1!$1:$1))

  • Reference cell: Data!$A$1
  • Rows to offset: 0
  • Columns to offset: 0
  • Number of Rows: COUNTA(Data!$A:$A)
  • Number of Columns: 4

Create the Pivot Table using Your Named Range

Now you need to create the pivot:

  1. Choose Insert > PivotTable

  2. Select Table/Range
  3. For the range, type your range name, e.g. Data
  4. Click OK
  5. Continue creating the pivot table as you normally would …

  6. Click OK

I Hope after using this usefull trick in excel you will be able to use whenever you have such a this type of requirment.