+ Reply to Thread
Results 1 to 2 of 2

How to extra data and perform a task from each filter within a pivot table

  1. #1
    Registered User
    Join Date
    03-31-2017
    Location
    nj
    MS-Off Ver
    MS Office 2013
    Posts
    1

    How to extra data and perform a task from each filter within a pivot table

    Hi Everyone,

    I'm trying to figure out how to have my vba perform a task and then repeat that same task for the next filter within a pivot table. It's a little complicated, so I'll try my best to explain it then show you the code I came up with.

    So I have two documents. Doc1 has a pivot table that I want to extract information from and Doc2 is where I want to place that information.

    Here are the steps I'd like to perform:

    1. Start in Doc1 while looking at Pivot table. Select an Item No. (Filter) so only one is showing. Copy that Item No.
    2. Click the already open Doc2 document. Ctrl + F and paste so you can find item number. While staying in that row, select the respective cell in the "N" column.
    3. Go to Doc1 and select cell B4. Ctrl + Shift + Down and copy that data.
    4. Go back to Doc2 and Transpose Paste that data in the already selected N cell.
    *5. Repeat for the next Item No. on the pivot table (So it cycles through all filters until it's done).

    I hope that was relatively easy to understand. Here is my code:

    Please Login or Register  to view this content.
    I've been looking online through the forums, and experimenting with a lot codes, but I haven't been successful. Granted I'm not that well versed and I haven't worked on VBAs in a couple of months.

    I'm open to any help. Thank you!

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: How to extra data and perform a task from each filter within a pivot table

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

+ 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. Pivot table filter not changing data in table - Using macro
    By DJDRU in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 11-09-2016, 06:16 AM
  2. Replies: 4
    Last Post: 11-30-2012, 03:14 PM
  3. Extra filter in pivot charts
    By Shahafve in forum Excel General
    Replies: 1
    Last Post: 04-04-2011, 04:29 PM
  4. Code to perform task based on data entered in userform
    By Staci in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-27-2011, 02:06 PM
  5. Pivot table creates extra data in fields
    By Michael.H. in forum Excel General
    Replies: 2
    Last Post: 06-18-2009, 11:59 AM
  6. Rearranging data to better perform in a pivot table
    By rjc008 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-27-2008, 06:29 PM
  7. Pivot Table (Extra Data next to Pivot Table)
    By Harish_Nagaraja in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-30-2008, 06:28 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