+ Reply to Thread
Results 1 to 3 of 3

Error in a recorded macro to create Pivot Table

  1. #1
    Registered User
    Join Date
    08-13-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    87

    Error in a recorded macro to create Pivot Table

    Hello All,
    I have recorded a macro to create a pivot table but I get an run-time error '5' when I run the macro. the bit of code that's causing the issue is here

    Please Login or Register  to view this content.
    First question is how to make the macro work each time and second question is how to ensure that all rows containing data is selected? in the code above the source data is set at R1C1 to R13C5. I will be having more or less number of rows depending upon the actual use case.


    Thanks,
    Aadesh

  2. #2
    Valued Forum Contributor
    Join Date
    08-29-2011
    Location
    Mississauga, CANADA
    MS-Off Ver
    Excel 2010
    Posts
    503

    Re: Error in a recorded macro to create Pivot Table

    use this instead of the bit of code you have posted

    Please Login or Register  to view this content.
    Regards,
    Khaled Elshaer
    www.BIMcentre.com

    Remember To Do the Following....
    1. Thank those who have helped you by clicking the Star below their post.
    2. Mark your post SOLVED if it has been answered satisfactorily:
    • Select Thread Tools (on top of your 1st post)
    • Select Mark this thread as Solved

  3. #3
    Registered User
    Join Date
    08-13-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: Error in a recorded macro to create Pivot Table

    It worked! Thanks

+ 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