+ Reply to Thread
Results 1 to 2 of 2

Excel VBA/Macro: Selecting Specific Columns and Rows in Pivot Table and Formatting

  1. #1
    Registered User
    Join Date
    01-24-2013
    Location
    Denver
    MS-Off Ver
    Excel 2010
    Posts
    17

    Excel VBA/Macro: Selecting Specific Columns and Rows in Pivot Table and Formatting

    I'm using a Pivot Table in Excel 2010, and while searching posts I find that a lot of users are frustrated like me because it doesn't keep all formats.

    So what I'm trying to do is run a macro that formats columns in a Pivot table, but limited to the last row and column in the table. I have the formatting info, but I just need to know how to apply it to specific columns and rows.

    What I was thinking might work is finding the last column of the Values row, in this case "Stops per Rte" which is the last Values column; however, I have months listed at the top, so it repeats across months. If the user filters only certain months then the # of columns will decrease.

    Same goes for the # of rows: of course, the user should be able to expand/collapse rows as needed, so I only want the column format to go to the last row or just above "Grand Total", if possible.

    Hopefully, this makes sense. Thanks in advance! = )

  2. #2
    Registered User
    Join Date
    01-24-2013
    Location
    Denver
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Excel VBA/Macro: Selecting Specific Columns and Rows in Pivot Table and Formatting

    I failed to mention that this would be for strictly borders and shading. Shading across the headers and borders around every 4 VAlues columns of each month down to the Grand Total row

+ 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. Replies: 0
    Last Post: 09-17-2012, 11:10 AM
  2. Macro to copy specific data to specific columns from a pivot table
    By Raju Radhakrishnan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-09-2012, 07:24 PM
  3. Selecting columns for pivot table
    By James1977 in forum Excel General
    Replies: 6
    Last Post: 07-24-2009, 09:01 AM
  4. Replies: 0
    Last Post: 03-22-2009, 07:17 PM
  5. selecting variable rows in a macro that creates a pivot table
    By amarch00 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-12-2005, 11:06 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