+ Reply to Thread
Results 1 to 3 of 3

How to change coding in Macro for Pivot

  1. #1
    Registered User
    Join Date
    05-09-2014
    MS-Off Ver
    Excel 2003
    Posts
    32

    Question How to change coding in Macro for Pivot

    I'm trying to run a pivot in Macro where the Pivot needs to choose the whole sheet and not a specific range as the data pasted in the sheet may fall in different range or rows however the columns are stable.,

    Below given is the coding for that Macro Recording for Pivot.

    Please Login or Register  to view this content.
    Thanks in advance for the help.,
    Last edited by sudharshan86; 05-09-2014 at 11:59 AM. Reason: Coding

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: How to change coding in Macro for Pivot

    Hi sudharshan and welcome to the forum,

    It sounds like you need to find the last row of data in your pivot data. I use this type of code...

    Please Login or Register  to view this content.
    Then LastRow will be the last row in the table with data in Column A.

    I hope this helps....

    You could also use a Dynamic Named Range for your data and use the name of the Range instead of the LastRow idea above.

    http://www.bettersolutions.com/excel...G820716330.htm
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: How to change coding in Macro for Pivot

    Hi,

    Please remove your code from your first post or put it in CODE brackets. Edit the post, select the CODE and click the "#" icon above the message area.

    Then - I have an example of what I mean. See the attached for what I think you want.
    Attached Files Attached Files

+ 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. Error in macro coding for Creating pivot
    By vkaushal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-24-2013, 07:27 PM
  2. [SOLVED] Vb macro coding for transpose - complete coding?
    By Dharani Suresh in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 08-02-2013, 11:16 PM
  3. [SOLVED] Vb macro coding for transpose - complete coding?
    By Dharani Suresh in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-02-2013, 05:04 AM
  4. [SOLVED] Implant macro coding into ASP coding
    By Sam yong in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-15-2005, 06:05 AM
  5. [SOLVED] Macro to change a Pivot Table
    By David M in forum Excel General
    Replies: 0
    Last Post: 03-22-2005, 02:06 PM

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