Results 1 to 4 of 4

data from getpivotdata in specific worksheet or in the multi-dimension array

Threaded View

Roshan.Shakya data from getpivotdata in... 02-16-2021, 08:12 PM
Eastw00d Re: data from getpivotdata in... 02-20-2021, 01:59 AM
Roshan.Shakya Re: data from getpivotdata in... 02-24-2021, 03:35 PM
Eastw00d Re: data from getpivotdata in... 02-25-2021, 12:49 AM
  1. #2
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: data from getpivotdata in specific worksheet or in the multi-dimension array

    Hi Roshan,
    a little late reaction, but you could "catch" the range in an array like this:
    Sub DrillSubTot()
    Dim d As Variant
    Dim ar()
    With Sheets("PivotTable").PivotTables(1)
        d = .GetPivotData("Price", "Country", "Bel")
        d = .GetPivotData("Price", "Country", "Bel").Address
        Range(d).ShowDetail = True
        ar = Selection
        ActiveSheet.Delete
    End With
    'You could add a line like this for example:
    Sheets("PivotTable").Cells(5, 15).Resize(UBound(ar, 1), UBound(ar, 2)).Value = ar
    End Sub
    Cheers
    Erwin
    Last edited by Eastw00d; 02-20-2021 at 04:14 AM. Reason: additional info
    I started learning VBA because I was lazy ...
    Still developing.... being more lazy...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Assigning non-uniform arrays to multi dimension array
    By roldy in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-20-2018, 04:15 PM
  2. refer part of a multi dimension array
    By aprildu in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-24-2017, 10:14 PM
  3. Assign Data Type to Array Dimension
    By JYTS in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-23-2016, 06:15 PM
  4. Can i add another dimension to my variant array and store additional data?
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-20-2012, 12:29 PM
  5. vlookup usage with dynamic & multi dimension arrays
    By pjjclark in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-26-2007, 04:02 AM
  6. Consolidate data in an 2-dimension array in VBA
    By Huyeote in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-18-2005, 03:05 AM
  7. Mutli-dimensional Array to Single-Dimension Array
    By Blue Aardvark in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-15-2005, 05:05 AM

Tags for this Thread

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