+ Reply to Thread
Results 1 to 2 of 2

Adjusting scale on Slicer

  1. #1
    Registered User
    Join Date
    10-27-2021
    Location
    Milwaukee, WI
    MS-Off Ver
    365
    Posts
    1

    Adjusting scale on Slicer

    I have created my pivot table and pivot chart. I have added the following code to have the scale on the secondary axis match the primary axis:

    Please Login or Register  to view this content.
    The problem is that now when I use my slicer the secondary axis scale remains the same as the summary and does not adjust to match the individual selections.

    Summary.png

    Work Center Selected.png

    How can I code it so that the secondary scale always matches the primary scale no matter the data set?

    I have posted this on MrExcel on Wednesday with no response yet, I am a bit anxious as I need to have this complete for presentation to Ownership on Monday morning. Any help is greatly appreciated. I tried posting a link to original posting but I have too few posts.
    Last edited by MikePaulus; 10-29-2021 at 09:06 AM. Reason: Include information on cross posting

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Adjusting scale on Slicer

    You need to rerun the code each time the pivot table changes.

    You can do this by placing the code in the PivotTableUpdate event

    [code]
    Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)

    End Sub
    [code]
    Cheers
    Andy
    www.andypope.info

+ 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. Single Bar Graph Pivot Chart with self adjusting lines of other data for a slicer
    By GoldsealActuary in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 06-08-2021, 04:55 PM
  2. Loop through slicer, while also selecting single slicer value on separate slicer
    By as_sass in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-30-2018, 01:41 PM
  3. Replies: 1
    Last Post: 04-23-2018, 09:43 AM
  4. Adjusting scale of graoh
    By jess_251 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-29-2014, 12:37 PM
  5. Adjusting Scale
    By PeterBrazel in forum Excel General
    Replies: 1
    Last Post: 07-27-2011, 10:11 PM
  6. Replies: 10
    Last Post: 06-10-2011, 12:29 PM
  7. Automatically adjusting x-axis scale
    By braydon16 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-02-2008, 12:24 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