Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How would you provide a Dynamic range in “Data Source” of Pivot Tables?

user-image
Question added by PHILIP MALINAO , Fleet Controller-Operation Supervisor , United Global Services (TM.Co)
Date Posted: 2016/03/28
Ahmed Mohamed Ayesh Sarkhi
by Ahmed Mohamed Ayesh Sarkhi , Shared Services Supervisor , Saudi Musheera Co. Ltd.

mashalla great answer from ms. ghada

 

Ghada Eweda
by Ghada Eweda , Medical sales hospital representative , Pfizer pharmaceutical Plc.

Getting Started with Pivot Tables

The first step in creating a Pivot Table is to organize your data in a list of rows and columns. Make sure that there is a heading in every column, and no rows that are completely blank.

In the screen shot below,

  • the list headings are in row3
  • the data is in rows4 to9, from column A to column H.

prepare data for excel table

Set Up a Dynamic Data Source

Next, set up the data range as a dynamic range, using one of the3 options shown below.

Advantages of using a dynamic range as a data source:

  • A dynamic range will automatically expand or contract, if data is added or removed.
  • You can base a pivot table on the dynamic range. Then, when you refresh the pivot table, it will include all of the data in the range, even if new rows have been added.

Option1 -- Named Table

In Excel and later versions, you can format your list as a Named Table, and use that as the dynamic source for your Pivot Table.

There are detailed instructions here: Excel Tables -- Creating an Excel Table.

To see the steps in creating an Excel Table, please watch this short video tutorial.

Option2 -- List

In Excel, use the List feature to create a dynamic list. It is a built-in tool that will create a List object on the worksheet.

To create a List:

  • Select a cell in the list
  • Click the Data menu, click List, then click Create List

    create list in excel

  • In the Create List dialog box, check that the range is correct, and fix the range, if necessary
  • Add a check mark to the "My List has Headers" option.
  • Click OK

create list in excel

When a cell in the List is selected, the list has a solid blue border around it, and there are filter drop down arrows in the heading row. There is also a blank row at the end, where you can add new items.

create list in excel

Option3 -- Formula-Based Dynamic Range

If you prefer not to use a named table or list, you can use a formula to create a dynamic range. This formula can use the INDEX or OFFSET functions to create the range.

The written instructions are here: Create a Dynamic Named Range in Excel

This video shows the steps for using the OFFSET function, in Excel.

Create the Pivot Table

Once you have the dynamic range set up, you can create a pivot table, based on that range.

Create a Pivot Table in Excel

  1. Select a cell in the database
  2. Choose Data>PivotTable and PivotChart Report
  3. Select 'Microsoft Excel List or Database', click Next.
  4. For the range, type your range name, e.g. Database
  5. Click Next
  6. Click the Layout button
  7. Drag field buttons to the row, column and data areas
  8. Click OK, click Finish

Imran Khan Innu
by Imran Khan Innu , Hydrogeologist , cairnindia

A dynamic range will automatically expand or contract, if data is added or removed.You can base a pivot table on the dynamic range. Then, when you refresh the pivot table, it will include all of the data in the range, even if new rows have been added.

it organize in rows and columbs 

Abu Bakar Ashfaq
by Abu Bakar Ashfaq , Senior Consultant , PricewaterhouseCoopers Middle East

It seems to be a good answer by Ms. Ghada

More Questions Like This