+ Reply to Thread
Results 1 to 2 of 2

pivot table questions

  1. #1
    Gary Keramidas
    Guest

    pivot table questions

    1. any way to use the A1 notation instead of r1c1?
    i'd rather use "b3:g68" than this:
    "Sheet1!R3C2:R" & Lastrow & "C7") , but can't seem to get it to work.

    2. it doesn't appear you can run code to overwrite a pivot table. what do
    experienced programmers do? i can delete the whole sheet before i run the
    code again, but what's the best practice? the number of lines in the other
    sheet will constantly change, so the range needs to be updated.
    or
    3. is there way to just update the range of data with performing the
    complete pivot table creation again?

    --


    Gary




  2. #2
    Patrick Molloy
    Guest

    RE: pivot table questions


    1)
    Sub test()
    Dim pt As PivotTable
    Dim txt As String

    txt = "6"

    Set pt = Sheet2.PivotTables(1)
    pt.SourceData = "Sheet2!R1C2:R" & txt & "C4"
    pt.RefreshTable
    End Sub


    2)
    pt.TableRange2.Clear



    "Gary Keramidas" wrote:

    > 1. any way to use the A1 notation instead of r1c1?
    > i'd rather use "b3:g68" than this:
    > "Sheet1!R3C2:R" & Lastrow & "C7") , but can't seem to get it to work.
    >
    > 2. it doesn't appear you can run code to overwrite a pivot table. what do
    > experienced programmers do? i can delete the whole sheet before i run the
    > code again, but what's the best practice? the number of lines in the other
    > sheet will constantly change, so the range needs to be updated.
    > or
    > 3. is there way to just update the range of data with performing the
    > complete pivot table creation again?
    >
    > --
    >
    >
    > Gary
    >
    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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