Named Ranges in Pivot table

maabbot

Board Regular
Joined
May 27, 2002
Messages
56
Hi

I have a sample of sales data which I have dynamically named according to criteria. I have also dynamically named the whole data set. When creating a pivot table I cannot seem to use the the name of the raw data set (or dynamic naing formula) when asked to input the data range to be used.

Does anyone have any advice?

Thanks
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Maabbot
Here's how.

DYNAMIC NAMED RANGE

[1] Activate Insert / Name / Define,
[2] Enter EndRow as name in the Names in the Workbook box,
[3] Enter as formula in the Refers to box:

=MATCH(9.99999999999999E+307,x!$A:$A)

Note. Replace x with the sheetname where the database is. ]

Example: If the name of the sheet is INPUT
=MATCH(9.99999999999999E+307,INPUT!$A:$A)

If you don’t have numbers (amounts) in column $A:$A then change that reference to a column that does.

Example:
=MATCH(9.99999999999999E+307,INPUT!$C:$C)

[4] Activate Add,
[5] Enter Database as name in the Names in Workbook box,
(Just type over what is there)
[6] Enter as formula in the Refers to box:
(Again type over or alter what is there)

=OFFSET(INPUT!$A$1,0,0,EndRow,5)
(5 indicates the number of columns in the table. Alter to suit.)

[ Note. Replace 'INPUT' with the sheetname where your database is. ]

If your database does not start in row one change the formula.
For example if your database starts in row 10 then subtract 9 from the formula and change the first part to reflect where the top left corner of the database is.

Example
=OFFSET(INPUT!$A$10,0,0,EndRow-9,5) (Again change the sheet name.)

Remember the database starts in the row where the headings are.

[7] Activate OK.

Now, you're ready to use the dynamic range name, Database in your workbook. It will expand or shrink automatically along with deletions from or the additions to the data area. When used with a Pivot Table it will update automatically upon Refresh Data.

NOTE: You must create the Pivot Table AFTER you create the Dynamic Range.

Enjoy
 
Upvote 0

Forum statistics

Threads
1,225,071
Messages
6,182,685
Members
453,132
Latest member
nsnodgrass73

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top