+ Reply to Thread
Results 1 to 3 of 3

Pivot tables & dynamic named ranges

Hybrid View

  1. #1
    Registered User
    Join Date
    05-20-2008
    MS-Off Ver
    2003 suite
    Posts
    64

    Pivot tables & dynamic named ranges

    I figured out how to create a dynamic named data range I would like to use for a pivot table, but when creating the pivot table, how do you tell it to use that named range?

    I got the info from http://www.contextures.com/xlNames01.html

    Some background: I've been playing with pivot tables a little lately, but somehow, when I'm changing the reference data by removing or adding rows, when I update the pivot table I get an error that says it's only referencing 1 row. I hope this dynamic named data range thing fixes that. Please let me know if it will not.

    Thanks!

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    The arguments on Debra site assumes the below

    Reference cell: Sheet1!$A$1 
    Rows to offset: 0 
    Columns to offset: 0 
    Number of Rows: COUNTA(Sheet1!$A:$A) 
    Number of Columns: 1
    Note: for a dynamic number of columns, replace the 1 with:
                COUNTA(Sheet1!$1:$1)
    To use
    1) Change Sheet1 references to your sheet name.
    2) Change Cell A1 to your First cell
    3) It assumes Column A has no blanks and Row 1 has no blanks
    4) You type in NameList (or your named range) in the pivot table wizard as range

    HTH..... if not post a sample workbook with your layout

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    05-20-2008
    MS-Off Ver
    2003 suite
    Posts
    64
    fer cryin' out loud....

    I forgot the '=' in front of the range name when referencing the pivot table.

    =OFFSET(MasterJobList!$A$2,0,0,COUNTA(MasterJobList!$A:$B),20) is called pivottableref.

    When I create the pivot table, I type in =pivottableref and it works fine.

    Thanks for joggin' those brain cells VBA noob.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Look Dynamic Named Ranges
    By peterkiukas in forum Excel General
    Replies: 11
    Last Post: 11-30-2007, 03:45 PM
  2. linking excel pivot tables to access 2000
    By nataliem in forum Excel General
    Replies: 8
    Last Post: 10-18-2007, 07:06 PM
  3. Auto Refresh Pivot Tables
    By Marcus Hartley in forum Excel General
    Replies: 2
    Last Post: 06-03-2007, 12:49 PM
  4. Dynamic Pivot Tables
    By calli in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 05-07-2007, 04:00 PM
  5. Assigning dynamic named ranges to listfillrange via macro code
    By Schwizer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-30-2007, 11:44 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1